Trivial JSF 2.0 URL to Page mis-match

Say I create two Java Server Faces pages that just link to each other. You'll notice that the URL's get mixed up. When I click from page 1 to page 2, the url continues to say page 1, and they remain reversed for the rest of time... This is useless for book marking. Is there a reasonable work around for this bug?
<html
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html">
     <body>
          This is page one!
          <f:view>
               <h:form>
                    <h:commandButton action="pagetwo" value="forward"/>
               </h:form>
          </f:view>
     </body>
</html>and page two is here:
<html
     xmlns="http://www.w3.org/1999/xhtml"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html">
     <body>
          This is page two.<br/>
          <f:view>
               <h:form>
                    <h:commandButton action="pageone" value="back"/>
               </h:form>
          </f:view>               
     </body>
</html>Since this is such a basic example it does leave me wondering if JSF 2.0 is a good technology to use to build a dynamic web site!
Here is a link to the screen capture of the URL/Page mismatched: [http://freed4all.wordpress.com/2010/06/22/jsf-weird-behavior/]
Here are the libraries I'm using through Maven:
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
</dependencies>

This is normal for JSF. Let me explain how this happens. When a page is submitted using a JSF commandXxxx component, it is not known at submission time what page will be the result. So the form is always written to submit back to the page that was rendered. The request comes in; the view is restored; validation and conversion occur (if they fail the original view is re-rendered); actions are fired during the execute application phase; the result of the action is fed to the navigation handler to determine the next view; the next view is rendered (or the original view is re-rendered). So this problem is an inevitable result of the way JSF was designed.
That is not to say there aren't ways around it. In JSF 1.x you could use the <redirect/> directive in the descriptor for the navigation rule. This would cause the server to issue a redirect response for the new view and thus the URLs would align. There are side effects however (some positive). In JSF 2.0 you might not have a descriptor for the navigation in question, I am not sure how you accomplish the same thing without creating an entry in the faces-config.xml.
Now I will get to the really good stuff, which I think is what you will desire. There are libraries to create bookmarkable, "pretty" URLs for your JSF application. Try googling PrettyFaces.

Similar Messages

  • How to invoke JSF With Standard Urls and parameters

    Hi,
    Could some one please help me how to invoke JSF with standard Urls and parameters?
    My requirement is:
    http://localhost:8080/myapp/faces/jsf_page.jsp?trackerID=11&viewPage="products"
    then i want to save the tracker details into database and redirect the user to "products" page.
    Would some one suggest me where can i get some example?

    Hi BalusC,
    It didn't solve my proble.....Your solutions are fantastic for most of the issues. But mine problem is unclear where JSF page tags.
    If possible, Could you please provide me how to invoke the method from JSF page....
    same code works if the user click on command button but my requirement is as soon as the user click on the link from 3rd party website, then he need to come to our web application and invoke the JSF page along with ManagedBean for saving details and redirect to disganted webpage.
    I will provide the following link to 3rd party websites. the URL is :: http://somedomain.com/myApp/Tracker.JSF?trackerID=111
    Could you please provide me the code i need to write in JSF ....just for invoking ManagedBean class...? how i code for page on load call the managedBean for specific method?

  • Is it possible to use JSF file as as error page.

    I am using jsf file as an error page.It is working in fine in websphere. But if i am using that only the exception is raised it is not going to error page.
    In Web.XML file,
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <error-page>
    <error-code>403</error-code>          <location>/faces/unauthorized.jsp</location>
    </error-page>
    jsf codings are placed under *.jsp files. In the time submitting form data to server a method throws NumberFormatException. This exception information is displayed in console. but blankpage is coming . It is not redirected to error.jsp fle which is under faces/error.jsp.
    If i am directly giving /error.jsp then it is giving Faces context is not created error.
    So i tried use simple jsp(pure jsp) file wihtin the folder and i set path like /pages/foo.jsp. It is working.
    Tell me is it possible to use jsf as error page.

    What would you hope to do with the reference?  The Mathscript node doesn't have a file reading capability.  You need to read the file and pass the data into the Mathscript node.
    EDIT: I stand corrected.  You need to use the fopen and fclose functions inside of the MathScript node to be able to read a file inside of it.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Steve, "Simple JSF Popup List of Values Page " does not work..

    Hi Steve,
    I read "Not Yet Documented ADF Sample Applications" #80 : "Simple JSF Popup List of Values Page " and download SimpleADFBCLOVJSF.zip, but when I try to run the sample, I get this error :
    JBO-33001: Cannot find the configuration file /xxx/common/bc4j.xcfg in the classpath
    What is wrong ?
    Thank you,
    xtanto

    Thanks for reporting this. I've uploaded a newer version of the zip file that fixes this issue.
    It was due to a last-minute refactoring of my model project from having the application module living in a package named "xxx" to another package named "example.model"

  • Page URL and Page Name in Enterprise Wiki

    Hello,
    I have a problem with the page URL and page name in our Enterprise Wiki. Parent and subsite locales are Turkish. My problem is, when I add a page in Enterprise Wiki and give it an English URL, the page Header is written in English and when I give a Turkish
    URL, the page header is written in Turkish. What I want to have (and I think the right way) is to have the URL in English and the page header in Turkish.
    To clarify my question, I will create a page with a Turkish name and URL. I will name it "Türkçe Tanıtım" (which stands for Turkish Demonstration), using Turkish characters. Then the URL becomes:
    http://mysite.com/Pages/T%C3%BCrk%C3%A7e%20Tan%C4%B1t%C4%B1m.aspx
    And the page header is "Türkçe Tanıtım", which is normal, as expected:
    If I change the page URL to look correctly, using English characters only, it looks like "TurkceTanitim." The URL becomes "tidy" (http://mysite.com/Pages/TurkceTanitim.aspx) but the page header also becomes "TurkceTanitim",
    which is not correct in Turkish:
    What I would like to have, and what I think it should, is to have a URL completely in English (http://mysite.com/Pages/TurkceTanitim.aspx) but have the page header in Turkish (Türkçe Tanıtım). I am sure this could be done in SharePoint, I/we are missing
    something but I don't know what.
    Can you give me a hand on this?
    Thanks in advance,
    Tolga

    Hi Tolga,
    I understand you would like to change Wiki page title but not page name in url.
    The title of the Wiki pages is always linked to the actual file name of that certain page. To get the use out of title property we have to manipulate the page template for the Wiki pages.
    Please refer to the article below and edit "/_catalogs/masterpage/EnterpriseWiki.aspx" in SharePoint Designer:
    http://social.technet.microsoft.com/wiki/contents/articles/17557.sharepoint-2013-change-page-title-in-wiki-sites.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to map a url that does not match with the context root  ?

    does weblogic support url that does not match the context root ?
    ex. the context root is AAA. the welcome page can be
    retrieved using http://localhost:7001/AAA
    Can it be configured to use http://localhost:7001/BBB to bring up the index.html in context root AAA ? if so, how ?

    I agree with Imp68.
    It still amazes me that in 2014 so many web sites are still not standards-compliant and instead insist on sniffing for the user-agent.  And, in the majority of cases, I've found that the websites work fine with any modern browser.
    phardell,
    To be clear, Safari is not the problem, the website is!  The developer of this website is still living in the 1990s and needs to move forward with the times.  Imp68's suggestion will cause Safari to "pretend" to be whatever browser you wish.  Try choosing "Safari 7" if that worked for you in the past and the website will likely go back to working.  If that does not work then try choosing "Internet Explorer 10" from the menu and see if that works.
    No matter what the result, you should look at the bottom of the page for a link to report problems with the website.  Submit a comment that tells them that they need to "modernize your website to support all modern web browsers".
    Good luck.

  • IPhone 6 Plus 16GB blue screen crashes: Read, error type:Address map hole or size mis-match

    Hi folks,
    Some time ago I had a 16GB 6+ and it crashed with the blue screen, so I returned it. I now have a brand new one that I got from Tmobile ($75 return fee) and although it has mostly worked just fine, I have gotten 2 blue screen crashes. Below are the details from the phone's log.
    What strikes me is the message "Read, error type:Address map hole or size mis-match".
    Does anyone know if this could be caused by a hardware defect?
    I've gotten one of these crashes running iOS 8.1.2 and another in 8.1.3.
    Thanks.
    Incident Identifier: 20304759-E90B-453F-BDC5-176AF4E30041
    CrashReporter Key:   fcf18d230005749957728546dea3221a0c588330
    Hardware Model:      iPhone7,1
    Date/Time:           2015-01-25 19:43:44.913 -0800
    OS Version:          iOS 8.1.2 (12B440)
    panic(cpu 0 caller 0xffffff8008cd45d0): L2C PIO error (src:core0-AF snoop, address:0x1202030208, access:Read, error type:Address map hole or size mis-match, L2C_ERR_STS:100003fc00000202, L2C_ERR_ADR:0x1108e1202030208, L2C_ERR_INF:0x2107)
    Debugger message: panic
    OS version: 12B440
    Kernel version: Darwin Kernel Version 14.0.0: Mon Nov  3 22:27:30 PST 2014; root:xnu-2783.3.22~1/RELEASE_ARM64_T7000
    iBoot version: iBoot-2261.3.33
    secure boot?: YES
    Paniclog version: 3
    Kernel slide:     0x0000000006000000
    Kernel text base: 0xffffff8008002000
    Epoch Time:        sec       usec
      Boot    : 0x54bc22ef 0x00000000
      Sleep   : 0x54c58398 0x0002abb4
      Wake    : 0x54c583ae 0x000f08df
      Calendar: 0x54c5b7e3 0x00025045

    same with my iPhone 4s 16gb
    {"os_version":"iOS 8.1.3 (12B466)","bug_type":"110"}
    Incident Identifier: 582496DB-6999-468C-9504-3D1C191B9F4B
    CrashReporter Key: 623a577555e51ed110b937358adfa66fba3ea447
    Hardware Model: iPhone4,1
    Date/Time: 2015-02-20 04:17:50.830 +0300
    OS Version: iOS 8.1.3 (12B466)
    panic(cpu 0 caller 0x83dc8347): "i2c1::_checkBusStatus Bus is still in a bad state; last write status 00010110 xfer 00000000 fifo 00000000 for device als"
    Debugger message: panic
    OS version: 12B466
    Kernel version: Darwin Kernel Version 14.0.0: Mon Jan 12 21:30:11 PST 2015; root:xnu-2783.3.26~3/RELEASE_ARM_S5L8940X
    Kernel slide: 0x0000000003400000
    Kernel text base: 0x83401000
    Boot : 0x54e68884 0x00000000
    Sleep : 0x54e68a7e 0x000dd6ac
    Wake : 0x54e68b19 0x00035c02
    Calendar: 0x54e68b1d 0x00040927
    Panicked task 0x84a87c60: 13773 pages, 122 threads: pid 0: kernel_task
    panicked thread: 0xc5066e80, backtrace: 0x81a33ca0
    0x834ad94d
    0x834adcb1
    0x8341d5bd
    0x83dc8347
    0x83dc8059
    0x83dc7e35
    0x8389c601
    0x8389c513
    0x836f6f65
    0x8389cc6d
    0x8389ccc5
    0x83a9f18d
    0x83a9c27f
    0x83a9c73f
    0x83a9c90d
    0x836f6f65
    0x83a9c8e5
    0x836e91e7
    0x8343ed9b
    0x834ab59c
    Task 0x84a87c60: 13773 pages, 122 threads: pid 0: kernel_task
    Task 0x84a87948: 771 pages, 3 threads: pid 1: launchd
    Task 0x84a87000: 2016 pages, 13 threads: pid 17: UserEventAgent
    Task 0x84a87630: 481 pages, 4 threads: pid 18: misd
    Task 0x84a87318: 4114 pages, 22 threads: pid 19: CommCenter
    Task 0x87a62948: 349 pages, 2 threads: pid 21: keybagd
    Task 0x87a62318: 574 pages, 4 threads: pid 23: iaptransportd
    Task 0x87a62000: 868 pages, 9 threads: pid 24: configd
    Task 0x87a7ac60: 793 pages, 4 threads: pid 25: lockdownd
    Task 0x87a7a948: 1218 pages, 6 threads: pid 26: imagent
    Task 0x87a7a630: 2771 pages, 4 threads: pid 27: atc
    Task 0x87a7a318: 792 pages, 2 threads: pid 28: fairplayd.H1
    Task 0x87a7a000: 1571 pages, 14 threads: pid 29: aggregated
    Task 0x87c4ac60: 1069 pages, 4 threads: pid 30: routined
    Task 0x87c4a318: 707 pages, 5 threads: pid 33: timed
    Task 0x87d23c60: 646 pages, 2 threads: pid 35: installd
    Task 0x87d23948: 2383 pages, 11 threads: pid 36: mediaserverd
    Task 0x87d23318: 1279 pages, 11 threads: pid 38: ubd
    Task 0x87d23000: 249 pages, 7 threads: pid 39: syslogd
    Task 0x87d6ac60: 410 pages, 2 threads: pid 40: softwareupdated
    Task 0x87d6a948: 851 pages, 5 threads: pid 41: mediaremoted
    Task 0x87d6a630: 1877 pages, 7 threads: pid 42: identityservices
    Task 0x87d6a318: 9938 pages, 16 threads: pid 43: SpringBoard
    Task 0x87d6a000: 453 pages, 2 threads: pid 44: fileproviderd
    Task 0x87e25c60: 609 pages, 4 threads: p

  • The https URL hostname does not match the Common Name (CN) on the server.

    Hi,
    I am getting the following error while trying to use https with our self-signed certificates.
    javax.xml.ws.soap.SOAPFaultException: Marshalling Error: The https URL hostname does not match the Common Name (CN) on the server certificate. To disable this check (NOT recommended for production) set the CXF client TLS configuration property "disableCNCheck" to true.
    The above error is the error I get, when I try to use the Web Services using https.
    I have added the following lines in cxf.xml but it still doesn't seem to work correctly.
    <http-conf:conduit name="*.http-conduit">
    <!-- deactivate HTTPS url hostname verification (localhost, etc)
    WARNING ! disableCNcheck=true should NOT be used in production -->
    <http-conf:tlsClientParameters disableCNCheck="true" />
    Kindly let me know on what would be the issue here?.

    I had P2V'd a SQL 2008 server and was having this issue.  I tried everything I could find to get the affinity corrected; setting the Lock Pages security policy, trying the affinity commands in Single User mode, etc.
    Then wrighbar's response got me headed in the right direction, but I ran into an issue where the previous engineer had set the Physical SQL server to have affinity on procs 9-16 of a 16 proc box, I could only set up to 8 procs on my VM.  After searching
    for a while for registry keys or config files that might be editable to change the affinity I couldn't find where SQL got that information from.  Finally it hit me, maybe it's stored in the master or msdb datatbases.  
    SOLUTION: I was able to go back to the original Physical machine, change the affinity settings there, Stop SQL on both boxes, then copied MASTER, MODEL, MSDB, TEMPDB from the original Physical machine to the new virtual machine.  All services started
    OK on the virtual machine now and affinity was set the way I needed it.

  • Mis match in attributes of item category B and Blanket PO item details

    Hi
    I could not able to create a Blanket PO with document type FO and item category B (limit).
    Normally for a blanket PO, GR is not allowed and IR is mandatory. So, I could able to see these checkboxes for GR (not set and grayed) and IR (set and grayed) in the item details of the PO in delivery and invoice tabs. But I end with an error message that 'GR is not set is used is not allowed' (exactly i don't remember but some thing like that)
    Before creating a blanket PO, I found that in 'attributes of item categories', that for the item category B, GR is set and IR is not set (in customizing-OMH4). Of course, one cannot change the attributes of item categories.
    I suppose due to this mis-match in the attributes of item categories and that in the PO, I'm getting an error message while creating a blanket PO and could not able to save.
    Also I have checked all the system messages for the message displayed. No where(i.e. in any message class or category and for that message number) I found any such message defined with error in 'attributes of system messages' for purchasing, material master, inventory, invoice verification etc.
    I suppose this error message is coming somewhere from the application program for the PO.
    So, what can be the solution
    waiting for your reply.
    thank you

    Thank you for your answer. I haven't mention this point in my thread but I have already tried this.
    I have tried matching the GR and IR controls of account assignment category with PO GR, IR controls and also with item category B, GR, IR controls. Still i am getting the same error and could not able to save the PO
    Also I have checked the field settings for PO for all categories like transaction relevant, item category relevant, etc in customizing.
    Main problem is both GR and IR controls are being grayed in PO. Other wise I could able to change them as per my wish and could able to avoid the error even though the GR and IR controls in PO are correct as per the process requirement.
    If possible, please check the GR and IR controls for item category B (in my system it showing that GR is set with binding and IR is not set with binding). But it should be reverse as per the process requirements and in limit PO it is showing correctly. i.e. with GR is not set with binding and IR is set with binding.
    thank you

  • Mis match in attributes of item category B-limit and PO item details

    Hi
    I could not able to create a Blanket PO with document type FO and item category B (limit).
    Normally for a blanket PO, GR is not allowed and IR is mandatory. So, I could able to see these checkboxes for GR (not set and grayed) and IR (set and grayed) in the item details of the PO in delivery and invoice tabs. But I end with an error message that 'GR is not set is used is not allowed' (exactly i don't remember but some thing like that)
    Before creating a blanket PO,  I found that in 'attributes of item categories', that for the item category B, GR is set and IR is not set (in customizing-OMH4). Of course, one cannot change the attributes of item categories.
    I suppose due to this mis-match in the attributes of item categories and that in the PO, I'm getting an error message while creating a blanket PO and could not able to save.
    Also I have checked all the system messages for the message displayed. No where(i.e. in any message class or category and for that message number) I found any such message defined with error in 'attributes of system messages' for purchasing, material master, inventory, invoice verification etc.
    I suppose this error message is coming somewhere from the application program for the PO.
    So, what can be the solution
    waiting for your reply.
    thank you
    Message was edited by:
            srinivas vandana

    Thank you for your answer. I haven't mention this point in my thread but I have already tried this.
    I have tried matching the GR and IR controls of account assignment category with PO GR, IR controls and also with item category B, GR, IR controls. Still i am getting the same error and could not able to save the PO
    Also I have checked the field settings for PO for all categories like transaction relevant, item category relevant, etc in customizing.
    Main problem is both GR and IR controls are being grayed in PO. Other wise I could able to change them as per my wish and could able to avoid the error even though the GR and IR controls in PO are correct as per the process requirement.
    If possible, please check the GR and IR controls for item category B (in my system it showing that GR is set with binding and IR is not set with binding). But it should be reverse as per the process requirements and in limit PO it is showing correctly. i.e. with GR is not set with binding and IR is set with binding.
    thank you

  • Order Pages to Match Bookmark Order

    Hi,
    How can I change the current order of my pages to match the current order of my bookmarks?
    Thank you.

    You can use the pages panel to change the order of the pages.

  • Include jsf file in a jsp page

    Hi Everyone,
    I have a plain jsp page with no JSF Components, but it has a jsp:include tag which is another jsp file which contains jsf components.
    When i try to run the plain jsp file ... i get the following error...
    java.lang.IllegalStateException: Cannot forward after response has been committed
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:324)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jsp.DynamicWebpart_jsp._jspService(DynamicWebpart_jsp.java:278)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jsp.Webpart_jsp._jspService(Webpart_jsp.java:302)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         .......... so.....on........
    I saw the source code for the plain jsp file and the error is because of including the jsp file with jsf components.
    The contents of both the jsp file is given below
    Plain jsp file
    DWStaticJSP.jsp
    <%@ page import="java.util.*" %>
    <%@ page import="com.mirus.bi.jsp.*" %>
    <%@ page import="com.mirus.bi.util.Log" %>
    <% Log.logDbg("*******before calling the faces file from DWStatic :"+rSetting.getStaticJSPFileName()); %>
    // name of the file name : /faces/report_palm.jsp
    <jsp:include page="<%=rSetting.getStaticJSPFileName()%>" flush="false" >     
                   <jsp:param name="DMode" value="DBoard" />
    </jsp:include>
    Jsp file with JSF component
    it is stored in faces folder
    /faces/report_palm.jsp
    <%@ page contentType="text/html" %>
    <%@ page import="com.mirus.bi.util.Log" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://mirus.com/jsftaglib" prefix="my" %>
    <f:view>
              <h:outputText value="Store Name:" />
              <h:outputText value="#{palmReportUIHandler.currentStoreDisplay}" />
              <h:outputText value="Year:" />
              <h:outputText value="#{palmReportUIHandler.currentYear}" />
              <h:outputText value="Month:" />
              <h:outputText value="#{palmReportUIHandler.currentMonth}" />
    </f:view>
    The Configuration in the web.xml for faces Servlet is given below
    <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    Does anybody know the solution to this problem
    Any kind of help will be highly appreciated.
    Pinkesh

    Hi Adam Winer,
    I want to try your solution.
    just wanted some more clarification .....
    So, let's say you have:
    DWStaticJSP.jsp: plain JSP
    report_palm.jsp: JSF JSP included by DWStaticJSP.jsp
    What you should do is use an URL of:
    /faces/DWStatic.jsp
    to access the outer plain JSP (yes, even though it's not really a faces page), and then have
    /faces/DWStatic.jsp include just plain /report_palm.jsp.
    In essence, the critical thing is that the FacesServlet wraps the entire request - FacesServlet cannot run
    for just a piece of the request.My question is where should i store the DWStatic.jsp file ... As u said i should acces it using /faces/DWStatic.jsp do i need to save it in the faces folder or just in the web app root.
    I cant save the DWStatic.jsp in the faces folder as this file is used for lot of different purpose in my company application.
    So can u give me a solution where in i can keep the DWStatic.jsp in the web-root folder and still try your solution
    Also is this the right setting for facesServlet in the web.xml.
    <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    Whatever follows below this line is the describtion of the web appp structure which i have in my company.
    We have an application where in all the jsp files are stored in the web-app root folder.....
    I will be using alphabets like a.jsp ... b.jsp .... to keep the explanation small...
    I have an a.jsp file which includes a b.jsp file which in turn includes a c.jsp......
    Now we have started using JSF.....
    Now as a developer .... i want the c.jsp to include a d.jsp file which contains JSF components...
    The thing is i cant change the location of a.jsp, b.jsp and c.jsp......
    Can u tell me how i should call " a.jsp" ... imean the url so that the "d.jsp" file gets processed properly.
    Also where should i save all the jsp files and what config is requiered in the web.xml for your solution
    I thank you for your help
    Pinkesh

  • JSF desing: Application with similar pages

    I have a design question regarding JSF. Sometimes, a web application consists of a set of pages that look basically the same but perform different operations in the background. As an example, consider Google that offers several search types (normal search, images, news, scholar, etc.). The interface is always very similar, but the search engine invoked in the background differs.
    Obviously it's a bad idea to have an own search and results page for each search type, as many things remain identical, which results in intensive code replication. If one page is changed, all pages have to be changed. That's definitely not desired.
    So what is the right way to overcome this problem using JSF? Of course I could write just one page and heavily use the "rendered" attributed in JSF tags (to account for the differences in the pages). I would then probably have some member "current search engine" in the backing bean and bind the action of the search button to the current search engine's search method. Whenever the search type is changed, the current search engine would point to another search engine object in the bean.
    Further, the JSF navigation would probably become dependent on the state of a session bean. If I want to link to a help page, for example, a different page should be displayed for the, say, image search and the news search. The "help" button would probably just be bound to a help() method, which, depending on the current search engine, would return "help image search", "help news search", etc. Denpendent on the outcome, JSF could then navigate to the correct page.
    I guess this approach would basically work. However, I see some relevant drawbacks.
    1) Assume the user is in the "news search" mode. He then clicks on "image search" and then hits the back button. Now he hits the "help" button. Without further measures that allow to detect that the back button was hit, I guess, JSF would now navigate to the page "help image search" (even though the user (who sees the news search page), would expect to be taken to the "help news search" page). I expect this behaviour, since JSF (or better the backing bean) does not know that we are on the "news search" page again (as it is only a cached copy from the browser). If there were multiple pages with different URLs for each page, JSF could detect that fact but checking the viewId (is that correct?).
    2) I guess the JSF pages become rather difficult to read (and thus to edit) due to the extensive use of rendered and unrendered parts.
    I guess the first problem could be solved with some hidden inputs on the pages (that inform the backing bean about the page we are currently viewing). But this rather looks like a hack to me...
    Therefore my question. Is there some nice way to write a JSF application with these characteristics? And if yes, how should it be done? Maybe there is something like inheritance and the ability to override certain parts (as in object oriented programming). Then I could keep different pages (with own URLs), but don't have to replicate the code.
    And ideas, hints and links to documents and discussions about that topic are highly appreciated.
    Thanks,
    Michael

    According the contents, I can't use JSF alone to deal
    big projects, have to associate with a framework. IF
    it is the case, I don't think it's an easy choice for
    new user, though it has great flexibility for the
    others.additional application framework helps you to separate functional and behavioural aspects of your system. it helps by providing standarised way of dealing with the separation. if you clearly design your own rules - you don't have to use additional 'big' framework. however, it might be usefull to use some smaller specialised ones, eg. for tiles or validation, if it's an issue in your particular case.
    that's my opinion.
    Any sugestion if there is a common appoarch that JSF
    doesn't have to associate with a framework (maybe in
    the near future)?now i'm working on portal application. it's build of rather small portlets, each one implemented using jsf. we doesn't use any additional frameworks. it wouldn't make much sense, as the portlet-based architecture enforces clear and distinct separation of functional modules.
    wojtek

  • JSF Portlet keeps last navigated page

    I have a small JSF application where there is a simple navigation from first displayed JSP pageA to JSP pageB:
    (of course with a managed bean
    <navigation-rule>
    <from-view-id>/portlets/pageA.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/portlets/pageB.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    As a standalone Web app the first pageA is always redisplayed with the main app url.
    However configured as a JSF portlet, after navigating to pageB, the portlet will always redisplay pageB!
    What configuration am i missing to reset to first pageA when redisplay main portal page?
    thanks.

    on a second thought the behavior i see might be valid due to the fact that i specify in my navigation rule a <from-view-id>, which as soon as i'm on pageB no longer applies, meaning there is no rule from pageB for same outcome, so pageB is still displayed.
    I added an extra rule for pageB and a "Back" button on pageB and now i can go back to initial page.
    for me it is a bit unexpected, due to this view "statefulness", but does make sense, need to better master JSF ...

  • Unable to manage JSF tabSet in frame(jsp page)

    i am using frameset in jsp page and in top frame i m placing the jsp file which contains the JSF tabSet with 4 tabs and i have set the url proerty and target ='bottom" i.e the name of lower frame
    i am able to navigate the pages in lower frame but not able to keep focus for selected tab.

    Hi,
    You could try using page fragment instead of frames.
    There is a relevant topic on EA discussion.
    Topic :TabSet navigation on a page fragment
    https://feedbackprograms.sun.com/project/forum/thread.html?cap={3F4DA363-16D3-4D4C-920C-992ECB054B6D}&forid={CC6B8562-F896-4A44-ACB6-4684BDD05E19}&topid={DFA961CF-157A-4E7C-9BBC-FDB69D982E9E}
    Hope this helps.
    Thanks,
    RK.

Maybe you are looking for

  • Whats the best way to import files from my ipod to my itunes

    I recently had to purchase a new laptop, and would like to know if anyone has a good way to import my library from an Ipod Classic to my new laptop(running windows 8). I don't know what software is out there for PC based Itunes. I had Best buy back u

  • Image gallery approach for additional details and add to cart option?

    With efficiency and minimalist downloads for smartphone users I would appreciate advice on a product image gallery. Currently I have an intro page and other simple information pages. My gallery pages ( four distinct pages for different leather goods)

  • Condition base value in rebates

    Hi, I am developing a rebate report to list all rebates along with condition base value,scae base value and accruals. would you please let me know how to calculate these values as this values are not available in tables straight away. let me know Fun

  • Do i need norton or other security for my mac Thanks

    do i need norton or other security for my mac

  • Bankruptcy FAQs

    This information is not legal advice and I am not a lawyer. Always seek a reputable bankruptcy lawyer to answer your questions prior to filing. - Tuscani Should I file Bankruptcy? A person should file a bankruptcy if, and only if, he or she can’t pay