JSF - view

Hi All,
I am currently trying to develop a project in JSF
i would to mention the following points
1)each user is provided by user name and password
2)each user has the right upload his personal images
3)each user has the right to add his news or personal data
4)each user can view only his/her news,data, images
5)there are common images for all the users (Advertisement images)
6)there common news - data for all the users
In the project there is one page called 'Displayer' , it contains the following parts
1)part to display the common news
2)part to display the common images
3)part to display the user's own news (if user x is logining then he should to be to view only his own news)
4)part to display the user's own images (if user x is logining then he should to be to view only his own images)
by the way , all the news and the images are dynamic i mean it changing from time to time
how i do implement that in jsf ??

Uhm, just write code accordingly.
Whenever you stucks at a specific coding step or have a technical coding question, you´re always welcome to post it here so that we can help you.

Similar Messages

  • As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know each Java Class that is involved in flow.

    As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know how flows goes to the server and server understands the method which is to be called of managed bean. I know it is with annotation @ManagedBean and method name, but how Call is binded with annotation @ManagedBean.
    In short, i want to know the internal implementation of JSF Framework.

    As a JSF Developer, I want to understand technically how the JSF View Components are rendered as html and how there events are binded to Server.I want to know how flows goes to the server and server understands the method which is to be called of managed bean. I know it is with annotation @ManagedBean and method name, but how Call is binded with annotation @ManagedBean.
    In short, i want to know the internal implementation of JSF Framework.

  • For loop in JSF View Pages

    Hi ALL,
    How can I work with iteration operation in JSF View Class as JSP scriptlets won't work in it
    thanks
    Sudhakar

    Hi Sudhakar,
    Thank you for explaining your requirement so clearly.
    The task you are trying to achieve is not possible in the jsp source. The reason being that Creator has a page backing bean where the component declarations are done. Hence adding components via the jsp source would not work as the page backing bean is essential for the working of the application.
    The solution for your problem would be something like this:
    Create an integer property named counter in your session bean and initialise it to 0.
    Add a gridpanel to your page.
    In your page backing bean (Page1.java) constructor add the following code
    for(int i=0; i<array.length;i++){
    SessionBean1 sb = getSessionBean1();
    int ctr = sb.getCounter();
    UIComponent parent = gridPanel1;
    HtmlSelectBooleanCheckbox chkBx = new HtmlSelectBooleanCheckbox();
    chkBx.setId("checkBox" + ctr);
    parent.getChildren().add(chkBx);
    sb.setCounter(ctr+1);
    The above code just uses one for loop. You could extend it to mak use of nested loops.
    I hope this helps
    Cheers
    Giri :-)
    Creator Team

  • JSF View Error

    Requirement is like that first it will go to another servlet ,will do some processing like session id ,security and then it will generate JSF view.
    When I am forwarding from my login servlet to JSF page ,
    i am getting this error
    Oracle.ClassLoader.Util.AnnotatedNoClassDefError
    Missing Error javax.faces.FactoryFinder
    Depended Class Com.LoginServlet
    Can anybody help me.
    Thanks In advance...

    Hi,
    make sure you don't perform a server side forward to the JSF JSP page but a redirect to theJSF URL that includes the "faces" path.
    Frank

  • Has anyone successfully implemented the JSF Viewer with Facelets?

    We have recently started integrating Crystal into one of our web apps that is using JSF + Facelets + Seam.
    I've built a taglib for the jsf viewer and configured it in web.xml and faces-config. I'm pulling an IReportSource from a backing bean using com.crystaldecisions.reports.sdk.ReportClientDocument  and that is using a .rpt file stored on a directory. This all seems to be working, as I can step through the code and see the IReportSource being generated.
    However, when the page loads, I am seeing the crystal javascript being converted in the page source, but nothing is loading on the page. 
    Has anyone seen an issue similar to this tied to Facelets? I've seen numerous documentation on Crystal and JSP, but very little on JSF  or Facelets.
    Has anyone been able to get a setup like this or similar to work properly?
    I've also noticed an error when adding the viewer:
    java.io.IOException: Recover report client document state failed.
    at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.readExternal(SourceFile:1492)
    at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.readExternal(SourceFile:131)
    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
    I believe this to be related to me switching over to the serializable ReportClientDocument: com.crystaldecisions.sdk.occa.report.application.ReportClientDocument  versus using the nonserializable version.
    When using the non-serializable version, I am seeing a constructor issue with the JPEReportSource
    Exception: java.io.InvalidClassException: com.crystaldecisions.reports.reportengineinterface.JPEReportSource; no valid constructor
    Has anyone seen this issue before or able to offer any suggestions?

    Well, according to the tutorials I have seen on the internet, I believe CrystalReport was successfully implemented and tested with jsp, to have it working with Facelets, we need to do a little bit of work around. We need to make a new JSF custom component and assign it to an external renderer. then we can use it to view the report
    please follow these and it should work after then,
    1- bring the following jars into your libs
    commons-configuration-1.2.jar
    Concurrent.jar
    CrystalCommon.jar
    CrystalContentModels.jar
    CrystalDatabaseConnectors.jar
    CrystalFormulas.jar
    CrystalQueryEngine.jar
    CrystalReportEngine.jar
    CrystalReportingCommon.jar
    icu4j.jar
    jrcadapter.jar
    jrcerom.jar
    keycodeDecoder.jar
    MetafileRenderer.jar
    rasapp.jar
    rascore.jar
    rpoifs.jar
    serialization.jar
    URIUtil.jar
    webreporting.jar
    webreporting-jsf.jar
    xercesImpl.jar
    xml-apis.jar
    2- bring the folder "crystalreportviewers115" right under the "WebContent".
    3- implement the custom FacesComponent and make it extend the "UIReportPageViewer" as follows;
    import packagename.CustomReportRenderer;
    @FacesComponent ("packagename.newReportViewer")
    public class UIReportViewer extends com.crystaldecisions.report.web.jsf.UIReportPageViewer implements Serializable{
        public UIReportViewer () {
            this.setRendererType("packagename.CustomReportRenderer");
    4- implement the renderer and make it extend the "ViewerHtmlRenderer" as follows;
    @FacesRenderer(componentFamily="CrystalReports.DHTMLViewer", rendererType="packagename.CustomReportRenderer")
    public class CustomReportRenderer extends com.crystaldecisions.report.web.jsf.ViewerHtmlRenderer implements Serializable {
    5- make a new tag library xml file next to the web.xml so the application can find the tag configurations. name it "taglib.xml" and add the following inside it;
    <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee"
        version="2.0">
        <namespace>http://new-jsf-custom-components/</namespace>
        <tag>
            <tag-name>ReportViewer</tag-name>
            <component>
                <component-type>packagename.newReportViewer</component-type>
                <renderer-type>packagename.CustomReportRenderer</renderer-type>
            </component>
        </tag>
    </facelet-taglib>
    6- configure the web.xml with the following
      <context-param>
            <description>
            State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <context-param>
              <param-name>javax.faces.FACELETS_LIBRARIES</param-name>
            <param-value>/WEB-INF/taglib.xml</param-value>
        </context-param>
        <context-param>
            <param-name>crystal_image_uri</param-name>
            <param-value>../../crystalreportviewers115</param-value>
        </context-param>
    7- implement the reportViewer.xhtml and make sure you have the following;
    - in the tag libraries add the namespace schema xmlns:crystalnmcps="http://new-jsf-custom-components/"
    - add the new reportViewer component
    <crystalnmcps:ReportViewer reportSource="#{youController.reportSource}"  displayToolbarLogo="false" parameterFields="#{youController.parameterFields}"  allowParameterPrompting="false" />
    Now run your app.
    I hope this helps. good luck

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

  • JavaFX as renderer for JSF view components

    I don;t know if I am asking the right question.
    Since javaFX has GUI components, Does sun provide JavaFX as a default renderer for JSF applications. Wouldn't that be cool say I define my view in some standard format and just configure a renderer in some xml and then with a magic, the UI is all based on JavaFX

    ejp wrote:
    So my question is primarily 'does this make sense?' Yes. I don't see why this wouldn't make sense.
    If so, secondly, does this imply I should/shouldn't use Facelets?For now on, it's recommend to start with it. It will be the default supported view technology as per JSF 2.0 and it offers much more advantages than the legacy JSP. Here's a nice document to start with: [https://facelets.dev.java.net/nonav/docs/dev/docbook.html].
    Thirdly, what else might I need in the stack?Maybe a 3rd party component library to take out the boring UI and ajaxical work from your hands. For example RichFaces.

  • Multiple forms on a JSF view

    Hi!
    Does somebody knows what I'm doing wrong here?
    Look at this very basic example:
    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Test multiple forms</title>
    </head>
    <body>
    <f:view>
      <h:form>
        <h:outputText value="Field 1: " />
        <h:inputText value="#{testMultiform.field1}" /><br>
        <h:outputText value="Field 2: " />
        <h:inputText value="#{testMultiform.field2}" />
        <br>
        <h:commandLink value="Test form 1"
           action="#{testMultiform.executeForm1}">
        </h:commandLink>
      </h:form>
      <c:import url="footer.jsp"/>
    </f:view>
    </body>
    </html>and the imported file (footer.jsp) looks like this:
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:subview id="footer">
      <h:form>
        <h:commandLink value="Test form 2" action="exe2">
        </h:commandLink>
      </h:form>
    </f:subview>The example uses two forms components (one included with the c:import JSTL command), each with a commandLink component. I know that JSF permits two forms in a view. However the second commandLink, inside the second form component, is ignored. Could somebody say me the reason?
    Thanks!
    Christian

    The problem, seems to be a bug in the reference implementation from Sun (verision 1.1). Try with next version (1.1.01). Follow this link for a more extended explanation: http://www.manning-sandbox.com/thread.jspa?forumID=95&threadID=10732&messageID=33625#33625
    (if the link is broken visit the site in http://www.manning-sandbox.com/ , where th bug is explained.
    I hope this helps. Bye!
    (another) Christian

  • How to skip span elements while tabbing thru a JSF view's form

    I have a form in a xhtml file that while I tab thru the fields, the focus goes to a <span> element which is rendered from a custom JSF tag. This is an expand/collapse section header. I don't want the focus to stop there at all.
    I have tried the following to no avail:
    1) disabled="true"
    2) tabindex="0"
    3) tabindex="-1"
    4) onfocus="this.blur();" <-- the onfocus event doesn't fire as this is rendered as a <span/> tag (not an input field)
    None of these attempted solutions worked apparently b/c the <span> element is not an inputtable field. What is the best solution for this problem?
    Must I dynamically set the tabindex attributes for all of the fields, thus bypassing the <span> elements? This is difficult to do with getter methods and counters in a backing bean as the getters are called X times throughout the JSF lifecycle.
    thx.

    asookazian wrote:
    None of these attempted solutions worked apparently b/c the <span> element is not an inputtable field.That's correct. Tabbing only works on selectable or editable HTML elements. Anything else will be ignored by all web browsers.
    >
    Must I dynamically set the tabindex attributes for all of the fields, thus bypassing the <span> elements? This is difficult to do with getter methods and counters in a backing bean as the getters are called X times throughout the JSF lifecycle.Setting tabindex will help. Or, you can use JavaScript to capture tabbing keystrokes- but JavaScript will be too much of an overkill in this case.

  • JSF View Path

    Is there a way to change the view path for files?
    So that when someone visits *.faces, the directory it searches for *.jsp files is user defined? Or is it always in the root web app directory? I like to put my files under WEB-INF/jsp or something similar....
    Thanks In Advance!

    Hi Timo,
    Actually, I may have spoken too soon. I've implemented as per your example, but my action operation (ExecuteWithParams or just Execute) returns null. I notice that your code uses operation.Invoke() instead of operation.execute(). Is there a particular reason for this?
    Is there some restriction on the methodAction being used - e.g. must it be a method you've defined yourself? Instead of an out-of-the-box action like ExecuteWithParams?
    Here's a snippet of the code I'm using in my servlet...
            Integer var0 = 0;
            try {
                var0 = Integer.parseInt(request.getParameter("param_id"));
            } catch (Exception e) {
                e.printStackTrace();
            response.setContentType(CONTENT_TYPE);
            BindingContext bindingContext=null;
            bindingContext = BindingContext.getCurrent();
            DCBindingContainer dcBindingContainer = bindingContext.findBindingContainer("xml_dummyPageDef");
            OperationBinding operation1 = null;
            operation1 = (OperationBinding)dcBindingContainer.getOperationBinding("ExecuteWithParams");
            Integer transid = var0;
            operation1.getParamsMap().put("transid",transid);
            operation1.invoke();
            Object result = operation1.getResult(); // cast to the expected result type Is there anything obviously wrong here? The result variable is null when I've finished. Including execute() to run the query results in the exception I originally had...
    Thanks.

  • JSF- view with no key-attributes cannot be activated

    Hi,
    i have a view Called Globals with 2 transient varibales , when i open many sessions at the same time and work with them , i got error
    JBO-30003: The application pool (model.PlacingModuleLocal) failed to checkout an application module due to the following exception:oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-25052: ViewObject Globals with no key-attributes cannot be activated!
    each attribute of the view have
    Updateable = Always
    Queyable is Checked
    Passivative is checked
    in the view properties, tab Tuning => No Rows
    and "Fill Last Page " and "Passivate State " and "Including All Transient Variables"
    all the 3 are checked
    the view is NOT based on Entity Object
    i use this view for holding data from SelectOneListBox
    should i modify the view by any way ?
    By The Way this view is exactly the same in SRDemo
    Any Suggestions?
    thanks....

    hi,
    answer is here
    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.bc4jjavadoc%7Crt%7Coracle%7Cjbo%7CCSMessageBundle~html/
    and it says
    JBO-25052: JboException
    Cause: A ViewObject with no key attributes has transient passivatable attributes. This type of ViewObject cannot participate in passivation/activation.
    Action: Set one or more attributes as key attributes for this ViewObject
    that means that SRDemo may have a little bug which is any attribute should be key attr in Globals view

  • How to get unordered/ordered list in ADF JSF

    Hey,
    So I'm thinking this is a pretty simple task but I just can't get it to work or find anything on it. I just want a simple unordered or ordered list in my JSF view, the text of each list element being an <af:outputText> value. At the moment I have something like:
    <ol>
           <li>
               <af:outputText value="something" />
          </li>
          <li>
                <af:outputText value="something2" />
                <af:goLink text=" text " id="gl1" destination="/faces/mypage.jsp"/>
                <af:outputText value="something3" />
          </li>
    <ol>So I expect it to output the below, but instead its completely messed up.
    1. something
    2. something2 text something3
    It's getting messed up because ADF is adding divs around the <af:outputText> tags, as well as completing the li tags before my ones. Surely there is a way to do this either through the framework or other means? Anyone know?
    Edited by: Ross on 30-Nov-2011 22:08

    An option is to wrap your elements in an af:panelList with listStyle='list-style-type:decimal', such that the af:panelList does the numbering of the elements for you. More information on the af:panelList can be found here: http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_panelList.html
    For the second list item made up of your 3 components, try wrapping them in a horizintal af:panelGroupLayout.
    eg:
    <af:panelList id="pl1"  listStyle='list-style-type:decimal'>
      <af:outputText value="something" />
      <af:panelGroupLayout layout="horizontal">
        <af:outputText value="something2" />
        <af:goLink text=" text " id="gl1" destination="/faces/mypage.jsp"/>
        <af:outputText value="something3" />
      </af:panelGroupLayout>
    </af:panelList>CM.

  • File Upload Problem in JSF

    Hi all,
    I have a problem in file upload. I have a file upload third party component which uploads the file with the filter action depending on the url. My requirement is to trace the uploaded filename for addressing it with the database record. So I need the filename in my backing bean to store it in the database. Ho can i get the filename from view page to backing bean. Any Ideas and help please.
    Many thanx,
    vijaycanaan

    Mr BalusC,
    Yes Iam talking about a custom made upload component. The fileupload tutorials u send are good but my requirement is not meeting them. Among my requirements one is mutilple file uploads in the single view page. This is possible at present with my custom upload componet. Only if the problem gets solved. Any way once again please think on my problem and give your solution on it.
    Here is my problem:
    The problem is I have to access the components from view page which this kind of requirement possible in jsp by request parsing which results the key value pairs of the form components. This same thing/way I should get in backing bean from JSF view page.
    The solution I want may like as follows.
    Note this code is incorrect and wrong but for to understand my requirement.
    someobject.getComponentIdValue("clientID"); which returns a string value as d:\images\Tutle.jpg
    The clientID is upload file component' Id . In the request it may be the key associated with value as file complete path. By this kind of way my upload filter is able to get the orignal file. Ok i need this in my  backing bean to get the orignal filename to insert into the database. Please for this give the solution or reply.many thanx,
    vijaycanaan.

  • Catching an exception in an JSF page

    Hi,
    I have made the following example:
    In my jsf page I have:
    <a4j:commandButton id="save" action="#{settings.save}"
    reRender="attributes" />
    <h:outputLabel value="Save" for="save" />
    <table width="100%" cellpadding="0" cellspacing="0">
    <!--
    <tr>
    <td> If exception occurs add extra buttons here for more actions
    </td>
    </tr>
    -->
    <tr>
    <td><ui:include src="/attributes.xhtml">
    <ui:param name="parent" value="#{settings}" />
    </ui:include></td>
    </tr>
    </table>
    In SettingsBean.java
    public void save() throws exception
    try
    doSomething();
    catch(Exception e)
    // catch the exception here and send it back to the jsf page????
    I want to be able to catch the exception when it occurs in my jsf page. If the exception arrises I want to add some extra buttons.
    Any ideas how to resolve this?
    Thanks in advance

    JSF does not work like JSP, even when using JSP with JSF, in that the execution is decoupled from the page being processed. So you cannot catch exceptions in JSF views.
    Assuming I have sufficiently confused you now, let me give you some ideas as to how to handle your situation. The usual way this is handled is to register a message when an exception occurs which are then displayed by <h:messages> or <h:message> components.
    However, this does not appear to be suitable for your purpose as you require specialized output when the exception occurs. So you could store a flag (or even the exception itself) in a backing bean and use the rendered property of all components to conditionally display your buttons. BUT you will need to take care that the dynamic value of the rendered property will be the same on the subsequent request or the actions for the buttons will not be queued.

  • JSF integration with Webwork and Freemarker ?

    My company is investing a lot in an application that uses Webwork and Freemarker. I'd like to reuse chunks of that but with JSF components for new development. I know it's possible to link to and from external URLs using JSF's navigation, but I don't think that buys me much in this case. Is it possible to use the JSF View (as in Model-View-Controller) with someone else's (Webwork's) front controller? I'm guessing JSF can coexist with Freemarker as it does with JSP and HTML. Or, does anyone know of any successful approach to Webwork integration anywhere?
    thx!

    My company is investing a lot in an application that uses Webwork and Freemarker. I'd like to reuse chunks of that but with JSF components for new development. I know it's possible to link to and from external URLs using JSF's navigation, but I don't think that buys me much in this case. Is it possible to use the JSF View (as in Model-View-Controller) with someone else's (Webwork's) front controller? I'm guessing JSF can coexist with Freemarker as it does with JSP and HTML. Or, does anyone know of any successful approach to Webwork integration anywhere?
    thx!

Maybe you are looking for

  • VPN with 2 network cards - vpn clients cannot see LAN.

    Problem: When a VPN client connects they can only access the server and not any LAN computers. Unable to even ping the LAN computers. The VPN client machine connects via PPTP and receives the appropriate IP address but the subnet mask field is blank.

  • Nokia N73 tim brand...when a new firmware...???

    I saw that the latest firmware version (for n73 tim brand) is v 3.0638.0.0.2 yet... when tim and nokia will release a new version??? PS sorry for my english.. XD

  • File Browse item...

    Hi everyone, I need a help...I'm sure it's a piece of cake for most of you...but. First of all I must explaine a architecture of the our application. So, we have a APEX and application which is placed on Server_01 and the data which are on Server_02.

  • Entering info into MSSQL db from a form

    Hi, I'm trying to enter data into a msSQL 7 db using a form. As long as the information I enter is an integer, it works fine, but if I enter a name like john for "enter name" in the form, I get the following error: javax.servlet.ServletException: [Mi

  • Help...Stupid Selection Tool Question

    I'm not seeing the dots when using the selection tool and am unable to select sections of objects. I don't know what to do.