Which framework? Struts/Faces/JATO?

Hi
I've just started a new job and am refactoring and redesigning a JSP/servlet J2EE application which is running on Sun One AppServer 7. It is a real mess so far and I need to implement an application framework. This needs to:
- rationalise the design pattern
- make more efficient the form/event handler chain (currently using horrible URL encoding and a big if/else statement in the servlet).
- make app more structured so new modules,web services, servlets etc can be bolted on later.
I guess the big one is Struts, but I also thought Faces looked quite good. Seemed a bit more lightweight than Struts and more like asp.net in its event handling model. I also obtained a demo of "JATO/Sun One Application Framework" which is a Sun One Studio 4.1 plugin. This has really neat GUI design tools, like visual studio.net.
I do not have significant enough experience with JSP/servlets to make an informed decision as of yet, so would like to hear some opinions from JavaRanchers.
What I will say is that the thing I most miss moving from ASP.net to JSP is:
a) the total seperation of html/tags and code behind.
b) the way that the .net framework 'glues' the events from the html controls to your event handling methods for you.
If I had to pick something now I would just pick Struts, cos I know it is widely used so can't be that bad...!
thanks in advance,
john

If you don't have a lot of servlet/JSP experience, any of those frameworks will be a chore to pick up. They're not trivial.
Struts has a lot of traction out there. There are several books about it, which might help.
Faces will eventually replace Struts, I think, but the implementations that are out there were still under development last time I looked. It's been a while. The books on Faces are still being written, so you're on your own there.
JATO I'm unfamiliar with.
I've done a model-2 MVC using JSPs and a front controller servlet without using any framework. I have an XML descriptor that maps events to pages to Commands. Since I already understood enough about JSPs and servlets it seemed easy enough to do it without having to climb the Struts learning curve. I used JSTL as the tag library. All this should fold right into Struts - if I ever get around to refactoring it. Works fine without it.
I'm not familiar with ASP or .NET, so I'm curious about what you miss:
a) the total seperation of html/tags and code behind.
I don't understand this. With JSTL, I've got JSPs with NO scriptlet tags or Java code in them at all. If that's what you mean, maybe you've got to learn a good tag library like JSTL.
b) the way that the .net framework 'glues' the events from the html controls to your event handling methods for you.
That's exactly what I hate about M$ tools - all the stuff they do for you behind the scenes. I like to mix my own glue so I can understand what's going on behind the scenes. JMO - MOD

Similar Messages

  • Which framework is preferable JSF 2.0 or Struts 2.1?

    Hello everybody ...
    I would like to ask this question Which framework is preferable JSF 2.0 or Struts 2.1?
    The comparison it could be in terms of the efficiency,less failures , facility, simple to use , the other technical perspectives .
    And which one is very useful in CRUD apps .

    I received your comment on the blog post in my mailbox, but it doesn't actually show up on the website for one reason or another. Let me address it here in the hopes you find it.
    Is JSF 2.1 the best to use for e-commerce and social application "bond together" Maybe. It all depends on your requirements. Like I state in the article, if you need lots of control over the front-end with javascript, Ajax, DHTML and whatnot then JSF might not be the right choice.
    and the important goal for this application is the availability and the very efficient respond from the server for the millions and millions of the clients request, That does not depend on code. It depends on the server software, the server hardware and the configuration. You are not going to learn how to make this happen by asking questions in a forum, it will require plenty of study and experimentation. If you expect millions of client requests then only one server is probably not going to cut it for example; you'll have to start thinking about clustering. Whole books can be written about that subject, and probably have.
    for sure If I am using Jboss , and by the way which is the really good application servers and web servers either is it Jboss or glassfish server . Both JBoss 7+ and Glassfish V3+ are excellent and fast Application Servers. I have always used JBoss so I am biased towards it.
    Or there are alternatives out there ,Can you elaborate on them quite bit.There are certainly alternatives, Weblogic 12+, Websphere 8+, Geronimo 3+, probably some others I'm missing. I have no experience with any of them, so I cannot elaborate.
    Because I am starting my project I am still confusing my first aim is the efficiency , efficiency in the sense as the user presses submit button the result should be right in front of his/her faceThat depends more on your server setup and the environment it is installed in. You aren't going to magically get good performance by using a specific framework.
    for definitely using the suitable web techniques and web services like AJAX and JQuery and other suitable web services which are required , in fact there are so many factors are responsible and must take care of this job like databases ,networking and OS platforms stuff.I don't know if you're asking something here or just making a statement :/

  • 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.

  • Struts-faces library: provided struts/tiles example doesn't work?!

    Dear all,
    I�ve been trying to migrate my struts-tiles application to JavaServer Faces using the struts-faces library. I downloaded the latest nightly build, but I was unable to deploy and run the second example (the one using tiles) on Tomcat 5.0.28.
         At first, the <h:commandLink> components for the �Register� and �Login� links on the first page (loggedoff.jsp) wouldn�t work, probably because they should have been replaced by <s:commandLink>. So I fixed that, but then I get an inexplicable http 404 error: �Invalid path /layout was requested� when I click on any of the two links.
         Looking at the source code of both JSP and HTML I noticed that the JSP element <s:form action="/editRegistration"> translates to <form id="menu:_id5" name="registrationForm" action="/StrutsFacesExample/layout.do" method="post">. The action element is obviously(?) wrong: there is no layout.do action mapping anywhere, it�s the path pointing to the main layout jsp with the suffix replaced!
    I�ve been able to trace the problem down to method �action� in library class org.apache.struts.faces.renderer.FormRenderer, which does the following:
    protected String action(FacesContext context, UIComponent component) {
    String actionURL =
    context.getApplication().getViewHandler().
    getActionURL(context, context.getViewRoot().getViewId());
    if (log.isTraceEnabled()) {
    log.trace("getActionURL(" + context.getViewRoot().getViewId() +
    ") --> " + actionURL);
    return (context.getExternalContext().encodeActionURL(actionURL));
    Any ideas on what could be going wrong here? I also tried deploying the example on Tomcat 5.5.7 and JBoss 3.2.5, but the behavior was the same.
    Any comments would be greatly appreciated!
    Mario

    Did you ever find a solution to this problem? No, unfortunately I am still looking for a solution to this one.
    I� ve also reported this to Bugzilla (http://issues.apache.org/bugzilla/show_bug.cgi?id=35265) so you might want to keep an eye on the issue, in case something comes up. However there appears to be no significant activity in the library�s source code repository for almost a month.
    After reading other discussions in forums like this one, I must say that I am discouraged: I seriously doubt if anyone has successfully managed to use the struts-faces integration library. A lot of people are suggesting that integrating the two frameworks is not worth the trouble, and so I am now in the process of evaluating the cost of complete migration from struts to jsf (btw, it doesn�t look good�). Nevertheless, some recent articles demonstrate the library�s use (the most recent one is Kito Mann�s http://www.jsfcentral.com/reading/#4030 ) so I might be wrong.
    It would be nice though if someone who has managed to integrate the two technologies successfully would share his views on this forum�
    Mario

  • Problem with struts-faces.jar

    hi,
    My requirement is to migrate a struts application to jsf.
    I am using the struts-faces.jar and doing all the configurations as mentioned.I am getting the following error while calling the application itself..
    java.lang.ClassNotFoundException: org.apache.struts.faces.taglib.LifecycleListener
    I am using the following version:
    1)Tried both struts-faces-0.4 and 0.3(downloaded from http://archive.apache.org/dist/struts/struts-faces/)
    2)Tomcat 5.0
    3)jsf-(SUN)
    4)struts 1.1
    Please let me know if i am doing something wrong. and any ways to fix this.
    Regards,
    Mythili

    Given the new release of the JSF ri and api .jar
    files,
    will this .jar provided at the apache site work?
    http://archive.apache.org/dist/jakarta/struts/old/relea
    e/struts-faces/
    No, those JARs only work with the EA versions of JavaServer Faces.
    A nightly build of the struts-faces integration library, that works with the beta release, is available at:
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/
    and the corresponding source code is part of the Struts nightly build bundles in:
    http://cvs.apache.org/builds/jakarta-struts/nightly/src/
    in directory "contrib/struts-faces".
    This package is not yet ready to be released, but seems to work for me in all the cases where the old library worked before. (If you're migrating, note particularly some tweaks you need to add in the struts-config.xml file for the new version, documented in README.txt.) Work continues on the Tiles integration which feedback has indicated is really important to people.
    Developers who are building new components and renderers will be quite interested in the techniques used to make all the attributes of your own components value-binding-enalbled (like all the ones on the standard tags are). The source code for the <s:form> tag, plus the corresponding component and renderer, will be helpful in illustrating this.
    Craig McClanahan

  • "Navigator" via JSF in a Struts Application (struts-faces)

    Hi!
    I got an existing Struts application which uses some includes to display a "Menu" on the left side with several links to navigate through the Webapp. Each of the Links points to a Struts-Action, that does some business logic and redirects any of a bundle of JSPs... Each of the JSPs is including this "navigation-jsp".
    Now i want to realize this Navigation with JSF and a TreeViewer (similar to the one in demo components) but the problem i face atm is, that when i click a link, and come back to any of the JSPs (after struts-action) how should this Tree-Navigator be rendered correctly???
    As said in topic, im using struts-faces.
    Any ideas?
    Greetings
    Patrick

    please guys - try to help me :-(

  • Struts-faces LifeCycle

    I am studying Struts-Faces to conclude how we can use Struts-faces to prepare the migration from struts to JSF. When a request is sent by user, is it handle by ActionServlet or Faces servlet or another servlet ? I am trying to constitute the LifeCycle for an application done by Struts-faces.
    Can anyone help me ?
    Thanks.

    when you say " the requests will be handled by the
    JavaServer Faces controller servlet " you want mean
    that any http request will first be handled by
    "javax.faces.webapp.FacesServlet" anf after will be
    redirected depending on the type of request (struts or
    JSF) ? Technically, it's not a redirect, or even a forward ... in struts-faces the default ActionListener supplied by JavaServer Faces is replaced by one that invokes the Struts request processor if this is a form submit.
    who invoke the "FacesRequestProcessor" ? what is the
    role of this class ? it is invoked by ActionServlet
    instead of RequestProcessor ?
    In the current struts-faces code, ActionServlet does not ever process any requests, but you still need it to set up the overall environment, which is done in it's init() method.
    As I said before I try to constitute the life cycle of
    Struts-faces application, What I have understand of
    you answer is that the Http request is handle by a
    front controller ( Web Container ?????) and then
    redirected to :
    ---Lifecycle of JSF if it is an immediate action, or
    we are NOT nested in a Struts form
    -- FacesRequestProcessor if wa are processing a form
    submit.
    Yes, but the JavaServer Faces runtime still handles all incoming requests (unless you are intermixing non-Faces-based use of Struts in the same webapp) -- it just calls the FacesRequestProcessor when appropriate.
    I read the article of IBM "integrating Struts, Tiles
    and JavaServerFaces and I don 't understand clearly
    how we use the class "FormComponent" and "FormRag".
    Can you give me more explanation please ?
    Thanks Craig .I can't speak for the authors of that article, or what they did to integrate Tiles support into the EA4 release of struts-faces. I can tell you that such measures will not be needed when the version of struts-faces compatible with the final version of JavaServer Faces 1.0. Until then, you are looking at code that is bleeding edge, not released, not documented, and not thoroughly tested. When released, it will be documented and tested.
    Craig

  • Which framework you finds better?

    Hello,
    which framework you finds better?
    Struts Chale
    WebWork
    Spring
    JSF

    Spring is dandy and currently get Kudos on being the hype of the month.
    JSF apps can be designed almost entirely through visual development tools. Now THAT's handy. Plus I feel it will remain long after many of these others drift away. The best parts of Spring that JSF doesn't already utilize will probably get consumed into it eventually, much like Struts.
    Like angrycat mentioned, none of these are "easy" to learn. They will require an investment of time.

  • What is struts-faces really aim for ?

    I don't really understand what is struts-faces aim for ?
    I explain myself :
    Supposing that on the first hand I've got an "old" application using struts that I would like to extend, but on the other hand I wish I could use JSF for my extends...
    I'll transform my "old" application in a JSF manner with the struts-faces provided and then I will create the extends of my application with "real" JSF pages ?
    Am'I right ?
    Thanks for your help !

    I don't really understand what is struts-faces aim for
    I explain myself :
    Supposing that on the first hand I've got an "old"
    application using struts that I would like to extend,
    but on the other hand I wish I could use JSF for my
    extends...That is exactly what it is aimed at.
    I'll transform my "old" application in a JSF manner
    with the struts-faces provided and then I will create
    the extends of my application with "real" JSF pages ?
    Am'I right ?
    Thanks for your help !Your extended pages will be "real" JavaServer Faces pages once you start using the component tags instead of the Struts HTML tags. The struts-faces library gives you the choice to continue to using Struts's other features (actions, form beans, validator framework, and eventually Tiles), in addition to JavaServer Faces components, if you want to.
    Craig

  • Which framework(s)/tool(s) for a web 2.0 application ?

    Hello,
    I'm new to Java, so excuse my stupid questions...
    I have to port a win32 GUI application to a web application using Java. The original application is not written with Java and is a full blown multitier win32 GUI application accessing a SQL server database.
    There are some requirement for the new application:
    1) has to use opensource tools and frameworks
    2) has to use JBoss application server
    3) has to use eclipse for development
    4) have a user interface as close as possible to the win32 application
    5) has to use the same (mssql) database
    The question is: which frameworks/tools is best to use in that environment ? JSP, JSF, RichFaces, Spring, Seam, Hibernate, Struts to name a few...
    Regards,
    F. Piette

    800089 wrote:
    Hello Gimbal2,
    As far as I can see, GWT makes application to run on Google servers.Then you should clean your glasses.
    My problem is to select the best framework(s) and tool(s) to develop the application, given the requirement I listed (Eclipse/JBoss/MSSQL/OpenSource). Unfortunately there are so much of them available that it is difficult to select the best one (Well things are relative of course). I don't want to use old technology, nor technology no yet wide spread on the market. I want a technology that many companies are using and for which I can easily find developer on the market.You want the best framework do you? Doesn't everyone these days.
    I'd say...go for JSF. Or if you don't want to, go for spring, or if that doesn't suit you, go for the GWT mentioned earlier. Unless you want to be retro, then go for Struts.
    Then when you've chosen your framework, see how many developers are willing to use it, if not enough choose another framework.

  • Struts-faces & JSF commandLink bug in RI 1.1

    Hello,
    There was a bug with JSF, multiple forms and commandLink as discussed in thread: http://forum.java.sun.com/thread.jsp?thread=526788&forum=427.
    This bug is now fixed for JSF h:form form type.
    I personnally use Struts and JSF with the struts-faces JAR and this issue is still not fixed when you create a form using the s:form tag, in fact as long as there is a s:form on the page the commandLinks do not work the same way as first reported for pure JSF apps.
    Will this be fixed anytime soon in the struts-faces library? I hope so because I do need it.
    Thanks
    Xav

    hi,
    i guess [email protected]
    or
    http://issues.apache.org/bugzilla/enter_bug.cgi?product=Struts
    might be a better place for that.
    regards.

  • Struts/JSF - struts-faces.jar

    I searched the jakarta source and binary
    sites and don't see this library anymore.
    (Unless I go to the contrib dir where the source code is file
    by file).
    Where can I find struts-faces-0.4.zip and its source code (bundled)
    so I can debug my errors?
    Thanks,
    gs

    http://archive.apache.org/dist/jakarta/struts/old/release/struts-faces/

  • Struts-Faces

    Hello,
    does someone knows how the validation model works when i am using struts and struts-faces.
    Example code:
    <h:input_text id="msg" valueRef="LM3800.msg" size="20" style="color:blue">
         <f:validate_required/>
         <f:validate_longrange minimum="1" maximum="5"/>
    </h:input_text>
    <h:output_errors for="msg"/>
    If I type a number greater than 5 i am routed to the output page and the text i wrote is shown.
    It seems to me that the validation is skipped when I use the combination of struts and jsf.
    Thnaks for your help.
    Tobi

    For a great article on Struts, Tiles, and JSF, see the following: http://www-106.ibm.com/developerworks/library/j-integrate/

  • Struts faces integration

    Can some one send me a simple example of Struts with JSF
    plz don'nt send the struts-faces example becz i already have that and it has some problem with weblogic8.1[Expression language limitation JSP2.0]
    Regds
    Amit Verma

    http://www.oracle.com/technology/pub/articles/masterj2ee/j2ee_wk8.html
    it might help u

  • Struts-Faces Integration (empty file)

    Hi,
    I have been trying to download the Struts-Faces integration library from:
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/
    But the files seem to be empty. Is anyone else having the same problem?
    Does anyone have the latest build available?
    Thanks.
    rgds,
    Q.

    Thanks for replyinh. The URL you provided has the same files....but they are empty. It seems something is wring with the scripts that do the nightly packaging?
    Have you actually tried to download the struts-faces and unpacked it ok...recently?
    q.

Maybe you are looking for

  • Hp 6525 all-in-one doesn't install correctly

    Hello and hope you can help me. I tried looking for the answer to my problme in previous forum posts but couldn't find anything useful for me.  I bought the printer one month ago, I installed it without any problems (wireless) but at one moment, I co

  • Keyboard and mouse not working correctly after installing Windows 8.1

    I was forced to upgrade my computer to Windows 8.1. My keyboard worked fine until the sytem did a reboot. Numbers on keypad stopped typing and letters were being capitalized when the caps lock was off and the numbers across the top will only type the

  • Plz help me in my code

    Hi all Plz tell me why 2D lines are not drawn here by clicking on "make connection" JButton and then on required JButtons to make connection between them.................................................................................................

  • ATV  "in use" when trying to play iTunes multispeaker from my Mac

    Whenever I try to turn on "multispeakers" from my Mac (so that I can play the music across my ATV sound system) I get an error message saying that the Apple TV speakers cannot be connected as they're "already in use". What steps do I need to perform

  • Adding a PO through DI API

    Hi, I am using the below code to create a PO using DI API. But the PO is not being created. I am getting an erroer as -50003 an internal error occured. Please let me know where I am going wrong                             Dim RetVal As Long