Creating Membership registration using Struts?

Any sample code or tutorials on how to do this using struts or just plain JSP? I have basic JSP experience but no real struts.
Also basic adding, editing and deleting records from mysql using JSP/html forms.
Just something that I can look, modify and learn from.
Thanks.

also ideally with security in mind and an email confirmation system to verify email address.
Thanks.

Similar Messages

  • How to create web site using STRUTS frame work

    Hi,
    I know how to create web pages using JSP & Servlets.But now i have to create Matrimonial web site using STRUTS frame work.Plz any one guide for me...
    Thank U....

    Struts is not to be confused with JSF.
    Start at their own homepage over there at apache.org.
    Good luck.

  • Unable to create a file using struts

    Hello experts,
    I am using this code in struts action class to create a xml file.
    File f = new File("src/java/usrXml/" + "my_name" + ".xml");
    f.createNewFile();but it is not working. and give me "File/Floder not found" exception. but when i copy same code in a java class having main() method. it is working fine.
    plz tell me why this code is not working in struts but in main method, and what should i do to make it working in struts action class.
    Thanks and regards
    Shams

    Why you would create a new file in a 'src' directory in a Struts action? The 'src' directory isn't even there when Struts is executing. But 'folder not found' means exactly that: you named a folder in the filename that doesn't exist. Not really a Struts problem, just a folder problem really.

  • How to create menu bar in jsp page using struts-tles

    I have started working with struts-tiles. I want to create menu bar using struts-tiles. please guide me.

    I've done this very recently. In fact, tiles has very little to do with the menu itself.
    In your layout, define where you want the menu to go.
    <tiles:insert attribute="menu" />Now, in the actual file, create your menu structure. This part is up to you. I've used http://www.brainjar.com/ as a starting point for the client side actions.
    On my menu page, I call a method on a custom object that returns the menu bar object. Currently, I'm working on putting this menu into some sort of cached object so it doesn't have to rebuild it on every page request.
    Perhaps I've misread your post and you're looking to use tiles, in and of itself, to simulate menus? Otherwise, I hope my post helps.

  • How to create poll functionality using java(struts)

    Hiii,
    How to create the poll functionality to place into the site. I am using struts and XML file to store the data. We should able to view the result of the poll in horizontal bar graph.
    Please give me an idea how to implement it or provide a link which has the implementation.
    Thanks

    Whatever happened to good, old-fashioned thinking? All we see here now is "how to write <common application> with minimal input from myself?"-type questions. It's only a matter of time until we get people coming here asking "how to write <massively-scoped enterprise app>? What class I need for that?". Oh, wait. We already do get that

  • Issue in converting Struts view to JSF view using struts-faces integration

    Hi All,
    I am facing a issue in my Sruts to JSF conversion application using struts-faces.jar integration library.
    Need expert's help desperately as I am not able to use <s:form> tag in my new jsf page to call a struts action.
    I want to call a struts action from my web page designed using JSF,
    but it seems impossible without using <s:form> tag from struts-faces integration library.
    Please suggest how to resolve this...
    I am using WSAD 5.1 IDE with inbuilt Test environment WebSphere server
    JSF Version: Sun's RI 1.1
    Struts framework: 1.2.6
    Struts-Faces Integration Library version: 1.0
    I have configured a controller element in struts-config.xml file as has been suggested by different online
    documents I studied:
    <controller>
    <set-property property="processorClass"
    value="org.apache.struts.faces.application.FacesRequestProcessor"/>
    </controller>
    But configuring a controller does not allow my test server to start up properly and due to errors the ActionServlet also becomes unavailable.
    If I comment the controller and start the test server it starts fine but then I cannot access the converted jsf page which contains the <s:form action="/xxxxx.do"> tag.
    If now I get back to <h:form> tag instead of <s:form> tag with a <h:commandButton action="xxxx.do"/> for form submission in my jsf page, I see the html page generated with all components but now checking the html source generated I see
    <form action="/contextName/jspFolder/sameDisplayedPage.jsf"> which is not valid and never gets called successfully.
    I think someways I need to use the <s:form> tag with the controller configured properly to use the struts-faces integration library's request processor, to get things working. But HOW???
    Following is the error I get if I use the <controller> tag element in struts-config.xml file and start the server.
    This error appears on starting the server without accessing any application's jsp web page
    [6/12/06 15:31:14:109 IST] 3e311815 ActionServlet E org.apache.struts.action.ActionServlet Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
    [6/12/06 15:31:14:109 IST] 3e311815 ActionServlet E org.apache.struts.action.ActionServlet TRAS0014I: The following exception was logged java.lang.IllegalAccessError: org.apache.commons.digester.SetPropertyRule tried to access method org/apache/commons/beanutils/BeanUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V
    at org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:198)
    at org.apache.commons.digester.Rule.begin(Rule.java:200)
    at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1548)
    at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:736)
    at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:685)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:331)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
    at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
    at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
    at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
    at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
    at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
    at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
    at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
    at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
    at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
    [6/12/06 15:31:14:188 IST] 3e311815 WebGroup E SRVE0020E: [Servlet Error]-[ActionServlet]: Failed to load servlet: javax.servlet.UnavailableException: org.apache.commons.digester.SetPropertyRule tried to access method org/apache/commons/beanutils/BeanUtils.setProperty(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:366)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
    at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
    at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
    at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1277)
    at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283)
    at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
    at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
    at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
    at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
    at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
    at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
    at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
    at java.lang.reflect.Method.invoke(Method.java:386)
    at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
    at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
    (same error message re-iterates/repeats itself... and finally -
    Error 503: Failed to load target servlet [ActionServlet] comes in web-browser
    Following is the error which I get if I comment the <controller> element in the struts-config.xml file
    and use a <s:form action="xxxxx.do"> in the struts converted jsf page. The web-server starts fine, but
    accessing the jsf page givers error as:
    [6/12/06 15:38:00:781 IST] 696f19de WebGroup I SRVE0180I: [Sample Struts-JSF integration application] [training2] [Servlet.LOG]: /jsp/welcomeF.jsp: init
    [6/12/06 15:38:01:219 IST] 696f19de WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
    at org.apache.struts.faces.renderer.FormRenderer.encodeBegin(FormRenderer.java:114)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
    at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:591)
    at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:478)
    at org.apache.jsp._welcomeF._jspService(_welcomeF.java:207)
    at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:662)
    at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
    at org.apache.struts.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1054)
    at org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:992)
    at org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:551)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1192)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:412)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    Finally if I change my <s:form action="xxxxx.do"> tag to
    <h:form>
    <h:commandButton id="submit" action="xxxx.do" value="Submit" />
    I see the webpage coming up in the browser (no controller element used in struts-config.xml file this time)
    But in the html source of this html created from jsf I see
    <form id="_id2" method="post" action="/training2/jsp/welcomeF.faces" enctype="application/x-www-form-urlencoded">
    here form's action attribute is pointing to the same displayed page with the context name prefixed. I
    assume it is because jsf could not resolve the "xxxx.do" action to anything so set it to the same displayed page.
    May be I am wrong as usual...
    Below is the simple struts jsp page which I need to convert to jsf page as I am converting only the View part of application.
    I want to use the same struts beans and application logic at the back-end. At front-end I need UIComponents from JSF to be used.
    Following is the struts jsp page
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
    <%@ taglib prefix="html" uri="/WEB-INF/lib/struts-html.tld" %>
    <%@ taglib prefix="bean" uri="/WEB-INF/lib/struts-bean.tld" %>
    <html:html>
    <html:base/>
    <html:messages id="messages" />
    <font style="color:red; font=weight:italic; font-family: century gothic">
    <html:errors/>
    </font>
    <BODY>
    <P>Sample Struts and JSF integration example</P>
    <P>This one is being displayed via Struts specific tags</P>
    <html:form action="validateUser.do">
    <bean:message key="label.name" /> : <html:text property="name" />
    <bean:message key="label.password" /> : <html:password property="password" />
    <bean:message key="label.age" /> : <html:text property="age" />
    <bean:message key="label.city" /> : <html:text property="city" />
    <bean:message key="label.address" /> : <html:text property="address" />
    <html:submit property="submit" value="Show info via Struts" />
    </html:form>
    </BODY>
    </html:html>
    I have converted it into the following jsf page
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://struts.apache.org/tags-faces" prefix="s" %>
    <f:view>
    <HTML><BODY>
    <f:verbatim><P>Sample Struts and JSF integration example</P></f:verbatim>
    <f:verbatim><P>This one is being displayed via JSF tags</P></f:verbatim>
    <h:form> <!-- Want to use s:form tag instead of this h:form tag -->
    <h:inputText id="name" value="#{userForm.name}" /><f:verbatim>
    </f:verbatim>
    <h:inputSecret id="password" value="#{userForm.password}" /><f:verbatim>
    </f:verbatim>
    <h:inputText id="age" value="#{userForm.age}" /><f:verbatim>
    </f:verbatim>
    <h:inputText id="city" value="#{userForm.city}" /><f:verbatim>
    </f:verbatim>
    <h:inputText id="address" value="#{userForm.address}" /><f:verbatim>
    </f:verbatim>
    <h:commandButton id="submit" action="#{user.facesAction}" value="Show info via Struts" />
    </h:form>
    </BODY></HTML>
    </f:view>
    I am very hopeful of some answer from respected group experts, please help me.
    I am in urgency of course but would not push for immed. response like other, just want some help for sure that is going to
    be extremely valuable to me. Anticipating a helping hand...
    Thanks and Regards
    Vishal Sharm
    Time's fun when you're having flies � Kermit, the Frog
    -------------------------------------------------------------------------

    I've managed to get this working Ok from JDeveloper:
    See:
    http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/?permalink=573FDB6F8D918B9704907899635CABB1.txt
    http://www.groundside.com/blog/content/DuncanMills/J2EE+Development/?permalink=2B04ACE99A6437EDED775F15553D1DED.txt
    Basically you just have to fiddle around with Library settings to get this working OK.
    As to how useful this is, well that's up to you - I'd not regard Faces + Struts as a must use combination, rather it's a can mix if you really need to. Look at Faces and Faces navigation first and see if that actually gives you enough before you start to look at mixing.

  • IWEB: Creating Membership Forms

    Need help with creating membership forms on my site. I also wanted to have the members listed on the site, something like Facebook for example.
    Any help deeply appreciated.
    Many thanks

    To add custom HTML to iWeb 1.x sites, see Chapter 2 HERE. Or consider using the free, web-based Ning as a "front-end" to your iWeb site — it offers _membership features_.

  • Loading Collections in to DropDownList box using Struts with bean

    Hi folks,
    I am very new to struts.
    I am developing one small web application using struts. I has developed Bussiness Logic, i need to use properly in struts.
    ManufacturerList.java is a Bussiness Logic class using to load all manufacturer from the database. It using by the collection LinkedHashMap.
    I need to use this BL in my struts application.
    GOAL: In sturts application i need to add the car details, one of the property for car is manufacturer.
    When creating the car, it should display all the manufacturer in the new student form.
    Please explain how to create with struts.
    Some of the Code i developed
    {color:#ff0000}<html:form action="/Car?op=saveCar">
    <html:errors/>
    <html:hidden property="op" value="saveCar"/>
    <html:hidden property="carCode"/>
    Car Name <html:text property="model"></html:text> <br>
    Manufacturer
    <!-- Defining the bean for manufacturer list getting from the request-->
    <bean:define id="mfrList" name="ManufacturerList" property="manufacturers"
    scope="request"
    type="java.util.Collection">
    </bean:define>
    <br>
    Manufacturer Year <html:text property="yearOfManufacture"></html:text><br>
    Date of Purchase <html:text property="dateOfPurchase"></html:text> <br>
    <html:submit value="Ok" />
    </html:form>{color}
    This is code is not working properly.... Please explain

    Hi i did like this
    {color:#0000ff}<bean:define id="mfrList" name="ManufacturerList" {color}
    {color:#0000ff}scope="request" {color}
    {color:#0000ff}type="com.icalib.trafficSimulator.ManufacturerList">{color}
    {color:#0000ff}</bean:define>{color}
    {color:#0000ff}<html:select property="make">{color}
    {color:#0000ff}<html:optionsCollection name="mfrList" label="mfrName" value="mfrCode"/>{color}
    {color:#0000ff}</html:select>{color}
    But the error is comming like thisjavax.servlet.ServletException: Cannot create iterator for 1:Honda
    2:Maruti
    3:Hyundai
    4:Toyota
    5:Accord
    6:Test_mfr
    7:test_mfr2
    8:456
    9:again
    10:123
    11:again1
    What to give in the label and value in the optionsCollection                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to get parameter and add it to hyperlink using struts tag?

    Hi everyone:
    There is a.jsp pass a parameter to b.jsp.How to get the parameter in b.jsp using struts Tag?I also want to add the parameter to a hyperlink in b.jsp.For example in b.jsp <html:link forward=.....>cxxxx</html:link>.How to add the parameter(get from a.jsp) to cXXXX in b.jsp?

    Try this:
    Copy A Request Parameter - You can create a new bean containing the value of a parameter included in this request. If no parameter of the specified name was included, a request time exception will be thrown - therefore, it is common to nest the use of this tag inside a <logic:present parameter="xxx"> tag to ensure that the parameter was really included. If there is the possibility that more than one parameter of the same name was included, specify the "multiple" attribute (and the resulting value bean will be an array of String values, instead of a single String).
    <bean:parameter id="name" name="name"/>
    And then just use <html:link> with paramId. No java code at all.

  • URGENT: Is it possible to upload multiple files using STRUTS

    Hi,
    Is it possible to upload multiple files using STRUTS.
    I am able to upload a single file. But how do i upload multiple files ??
    upload.jsp
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="/secure/uploadFile.do" enctype="multipart/form-data" method="POST" type="com.smartstream.webconnect.user.actions.UploadActionForm">
    <p>File to upload
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit/></p>
    </html:form>
    </body>
    </html:html>
    UploadAction.java
    public class UploadAction extends BaseAction {
        Logger log = Logger.getLogger(AttachMessageAction.class);
        public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ActionException {
            System.out.println("executeAction of UploadAction");
            UploadActionForm uploadActionForm = (UploadActionForm) form;
            int fileSize = uploadActionForm.getFileUpload().getFileSize();
            System.out.println("uploadActionForm.getFileUpload().getFileSize() = " + uploadActionForm.getFileUpload().getFileSize());
            byte buffer[] = new byte[1024];
            try {
                BufferedInputStream bufferedInputStream = new BufferedInputStream(uploadActionForm.getFileUpload().getInputStream());
                FileOutputStream fos = new FileOutputStream("s:\\uploaded\\" + uploadActionForm.getFileUpload().getFileName());
                int read;
                while ( (read = bufferedInputStream.read(buffer,0,buffer.length)) != -1) {
                    fos.write(buffer, 0, read);
                fos.flush();
                fos.close();
                bufferedInputStream.close();
                return mapping.findForward("success");
            } catch (IOException e) {
                e.printStackTrace();
                return mapping.findForward("error");
            }catch(OutOfMemoryError o){
                o.printStackTrace();
                System.out.println("o.getMessage() " + o.getMessage());
                return mapping.findForward("error");
    UploadActionForm.java
    public class UploadActionForm extends ActionForm{
        private FormFile fileUpload;
        private byte[] fileContent;
        public FormFile getFileUpload() {
            org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0;
            return fileUpload;
        public byte[] getFileContent() {
            return fileContent;
        public void setFileUpload(FormFile fileUpload) {
            this.fileUpload = fileUpload;
        public void setFileContent(byte[] fileContent) {
            this.fileContent = fileContent;
    }--Bhupendra Mahajan

    Yes, you could try using the multipart handler...
    But I have a better idea...
    Determine the maximum number of file uploads that the
    user can do at one time. I mean, you can't
    realistically have the user upload a million files at
    one time. So say the max is 20. So you create your
    action form class with 20 FormFile fields called file1
    to file20.
    Then when you dynamically create your page, you
    dynamically create the specified number of file fields
    and 1 hidden field called "totalFiles" which contains
    the number of file fields you created. This should be
    an int field in the form bean.
    Then when you do your action processing, you just loop
    thru the totalFiles... Or well, actually, you may not
    need that at all. You could just check all the
    FormFile fields and whatever ones aren't null contain
    files.But what about UploadActionForm.java[b]
    How do i have exact mapping of the HTML form in this file ??
    --[b]Bhupendra Mahajan

  • Using Struts

    Can anyone help me. I am new to development and i am a bit confused. I am supposed to be tidying up a struts application that runs on a UNIX platform using Weblogic App server(v 6.0 i think). I have some understanding of what is going on but never developed before so i have a lot of questions. I am using Eclipse IDE
    1. Do i use the ant build to create the directory structure? or do i do it manually?
    2. I downloaded the latest version of Struts 1.3.5 how do i add its capabilities so i can use the jar files? I didnt notice struts. jar in the lib folder when i downloaded it, can i assume it is there? or where should i look.
    3. the environment was pretty much set up except adding those files. Are there any other files to be added, i was kind of left alone.
    My questions seem dumb but i could use alot of HELP
    thanks

    As you are new to struts... dont use struts source insted download struts prebuilt binaries from here
    http://struts.apache.org/download.cgi#struts135
    download struts-1.2.9-bin.zip not src .. so u dont need to to build as its prebuilt
    next thing is to setup struts
    copy all the jar files under "F:\RAM\Material\Struts\struts-1.2.9-bin\lib" in to your
    WEB-INF/lib filder
    Configure ActionServlet into your web.xml
    Do url mapping in ur web.xml
    Declare tlds in ur web.xml (html, bean,logic)
    Create a struts-config file (specify it in ur web.xml file)
    Create a sample action
    Create an action form
    Do action mapping , form bean declaration in struts-config.xml
    Better you download this ebook Struts_Survival_Guide do googling for it its free
    If its helpful dont forget to give dukes
    Sudhir Nimavat

  • Using Struts, On submit button in child window, its opening new window.

    We are developing a project using Struts and BC4J. I am opening a child window(window.showmodaldialog) from main window using struts action. Actually Child window is a search kind of page. User will enter the search criteria and press the sumbit button. I want to display the search result in the same window using datatable when jboevent="submit". But its opening new window and displaying the result in that. However in <html:form>, Even I tried the target="_self".
    I am not sure wether the associated action in the <html:form> is forcing to open a new window.
    Similar kind of thing I am able to achieve in other similar search page, it its not a child window.
    Please let me know what I am missing.
    Thanks,
    Arvind

    So you want the search window to submit back to itself so you see the search field and a result list..?
    In pure Struts terms either using "_self" or the name of the popup window in the <html:form> tag will do the trick
    You need to make sure that the inital window that you created as the popup search window has a name in the first place - can you specify this with showModalDialog()?
    BTW isn't showModalDialog an IE only feature...

  • Cannot load JDBC Driver Class in Tomcat5.5 using struts.

    Hello to all,
    I'm working in the struts environment using Esclipse3.2 IDE.
    And I have installed Tomcat5.5 server.I have created the LoginForm
    in struts.Now i like to connect my LoginForm with MySql database.I
    have also created the database in MySql naming strutsdatabase.
    I had also download the mysql-connector-java-3.0.16-ga-bin.jar and
    save that in C:/tomcat/commons/lib directory.
    While running I have got the below error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:808)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    And I have attached my struts-config.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software
    Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <data-sources>
    <data-source
    type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/strutsdatabase?autoReconnect
    =true"/>
    <set-property property="driverClassName"
    value="com.mysql.jdbc.Driver"/>
    <set-property property="username" value=""/>
    <set-property property="password" value=""/>
    <set-property property="maxActive" value="10"/>
    <set-property property="validationQuery" value="SELECT
    COUNT(*) FROM test"/>
    <set-property property="maxWait" value="5000"/>
    <set-property property="defaultAutoCommit" value="false"/>
    </data-source>
    </data-sources>
    <form-beans>
    <form-bean name="LoginForm"
    type="fino.web.struts.action.LoginForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards/>
    <action-mappings>
    <action name="LoginForm" path="/login" scope="request"
    type="fino.web.struts.action.LoginAction" validate="true">
    <forward name="success" path="/success.jsp"/>
    <forward name="failure" path="/failure.jsp"/>
    </action>
    </action-mappings>
    <controller/>
    <message-resources null="false"
    parameter="org.apache.struts.action.ActionResources"/>
    </struts-config>
    Friends,please help me to find solution to this problem.

    Note: This thread was originally posted in the [Java Compiler|http://forums.sun.com/forum.jspa?forumID=7] forum, but moved to this forum for closer topic alignment.

  • Using Struts or Spring dilemma?

    HI all,
    just a query , if we want to create a huge application having around 100's of Enterprise Beans and JSP pages around 1000, which Framework one should choose or go for between Struts and Spring. I have worked on Struts it seems to be popular choice and stable. But don't even have a vague notion about Spring Framework.
    Wherein the application demands stability and performance enhancement.
    Avadhoot.

    Struts and Spring are two seperate frameworks , one can be used to implement View lyer using MVC and the other can contain all aspect of your application from the view to business and back end connection.
    you can use Struts with spring , int this scenario struts will be the View layer and spring framework will handle other stuff like DA , Mailing , Transaction , Secrity ,....
    I can say that :
    go with EJB for Business layer , Use struts for View
    and use netbeans 5 as IDE , it made developing ejb stuff too easy.

  • How to create a jsp with struts tld

    Hi
    I am new to jsp technology also struts.
    I want to create one jsp page with using struts.
    The page should be one text box and submit button.
    I was try to create one page in my application. But its showing the Errors
    Here i paste the Error
    javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
    Please anybody help me .
    Thanks
    MerlinRoshina

    hi
    check out this url
    http://forum.java.sun.com/thread.jspa?forumID=4&messageID=1384153&threadID=337537

Maybe you are looking for

  • I deleted all my thumbs and originals...

    really need help!!!! I was trying to label all my photos and everything, and i put the originals and thumbs files in the trash. When i went to iphoto to view my photos, it shows all the thumbs, but when i go to view the pictures full screen, nothing

  • How to populate the error message in OVS search popup

    Hi All We have the following requirement to display the error message in the OVS popup. currently we are opening an OVS popup on click of an action successfully. Currently we had put the error message in the ApplyResult() method, but error message wa

  • What is the appropriate data expiration / eviction scheme for the following scenario

    We currently have an expiration scheme through which data entries in cache-A get expired after the cache hits a certain size. The LRU entries are expired after the max threshold is reached. But the issue is that certain entries in the cache are rende

  • Sql_text got truncated

    Hi, I'm using Oracle 9i, and sql_text got truncated. Do you know a way to get full sql_text using hash_value? Thanks! select sql_text , b.username , 100 - round(100 * a.disk_reads/greatest(a.buffer_gets,1),2) hit_ratio from sys.v_$sqlarea a, sys.all_

  • Upload of EBS

    Hi all, I am trying to upload an EBS file and the system issues error message "House bank: no entry with bank key& and account&'. All the bank details data are maintained correctly in the house banks, there is entry with the specific bank key and acc