JSF page navigation under WEB-INF

If page navigation starts on index.xhtml, and then forwards to page2.xhtml, how can I then forward from page2.xhtml to page3.xhtml?
WebContent
  META-INF
  WEB-INF
    lib
    pages
      page2.xhtml
      page3.xhtml
    faces-config.xml
    web.xml
  index.xhtml
Controller.java
class Controller {
public String gotopagetwo(){
return "/WEB-INF/pages/page2";
public String gotopagethree(){
return "/WEB-INF/pages/page3";
index.xhtml
h:commandButton id="submit" value="Submit" action="#{con.gotopagetwo}"></h:commandButton>
page2.xhtml
h:commandButton id="submit" value="Submit" action="#{con.gotopagethree}"></h:commandButton>

I don't think so....
If u read is u will know....
http://courses.coreservlets.com/Course-Materials/pdf/jsf/02-Page-Navigation.pdf
what I got is
HTTP Status 404 - /abc/WEB-INF/jsp/main.jsf

Similar Messages

  • Access dead page for access page under WEB-INF

    hi, all , I have some page is under WEB-INF , if the user direct access this kind of jsp pages, will have some 4004 statue, could I have a customer error page to instead this 404 page . thankk you!

    Thank you,
    I realize my problem and your answer make my more understand my problem, but the problem still there.String myLink = req.getParameter("myLink");
                String target = null;
                HttpSession userSession = (HttpSession) req.getSession(true);
                HttpSession session = req.getSession();
                String word=(String)session.getAttribute("said");
               // out.println(word);
                if(word.equals("")||word==null)
                 RequestDispatcher rd =
                 getServletContext().getRequestDispatcher("/error/notFound.jsp"); //under?Hello
                  rd.forward(req, response);
                else{
                target = "/WEB-INF/jsp/" + myLink;
                // at dSec.jsp id is link, so you can't use userSession.setAttribute("link", target) in here!
               // userSession.setAttribute("place", target);
                RequestDispatcher rd =
                 getServletContext().getRequestDispatcher(target);
                rd.forward(req, response);} when I direct call my http://localhost/Hello/servlet/JumpLink?myLink=test1.jsp I get and empty page , not be forward to notFound page, what I did wrong?

  • Does JSP best practice of putting under WEB-INF apply to JSF pages?

    I'm new to JSF and wondering if the "best practice" advice that used to be given of storing your jsp pages under WEB-INF (when using Model2) to keep them from being served up without going through your controller still applies with JSF.
    Since the component lifecycle is so different, I'm wondering if it would still apply? If anyone can explain why it might or might not apply I'd appreciate it!
    Thanks!

    The rule is:
    keep all the pages you don�t user to "browse", under the WEB-INF directory.
    MeTitus

  • Pros and Cons of putting jspx pages under WEB-INF

    Greetings All,
    I have been using JHeadstart release 10.1.3 Prod for a while now and was generating pages in various subdirectories under WEB-INF/pages/ and things are working fine.
    However, recently I came across a post in jDeveloper forum Re: Access JSF Pages within WEB-INF directory where Frank Nimphius has mentioned that there is no sense in putting JSP files that are used with JSF into WEB-INF.
    I know that in struts world it makes sense to put the jsp files under WEB-INF to prevent the users from directly accessing them and force them to access them only via struts actions/navigation rules; but in JSF world we anyway expose the jspx names to the user and in-fact if we keep the pages under WEB-INF the url to access the pages also contains 'faces/WEB-INF/...'
    Thus, I would like to get opinion from various experienced professionals participating in this forum and more so from JHeadStart team members on Pros and Cons of putting jspx pages under WEB-INF
    regards - rutwik

    Rutwik,
    From your reply it seems that, for now, there should not be any impact on us as long as we don't upgrade to JDeveloper 10.1.3.1, as anyway the current JHS version is not certified against it.
    Correct.
    However, to be compatible with future releases of JHS and JDeveloper, will it be good to change the location of pages in our JHeadStart definitions to move them a directories above the WEB-INF etc and re-run the JHeadStart generators?
    Yes.
    Or, will the patch take care of modifying the current JHeadStart definations?
    No, Service Update 1 has a different default value for the pages dir , it is now /pages/ instead of /WEB-INF/page/, that's all.
    Also, with this patch, will we be able to upgrade to jDeveloper 10.1.3.1, which we would like to do once we have a production release?
    Yes, Service Update 1 is compatible with JDev 10.1.3.1
    Steven Davelaar,
    JHeadstart Team.

  • Warning - When Compiling .jsp pages under WEB-INF

    Created a directory jsp under WEB-INF and when i compile the jsp pages i get the following warning message
    Warning: package name web2d_inf._jsp does not match source file name C:\ProviderEnrollment\ProvEnrollView\classes\.jsps\_WEB_2d_INF\_jsp\_searchprovider.java
    Need help
    Thanks

    We have encountered this warning too.
    I'm not an Oracle employee, but it looks like there's a bug in JDev that preserves the case for the output directories but not for the package name that is supposed to correspond to the output directories.
    In any case, we haven't seen any runtime problems that seem to be related to this warning, so you may be safe to disregard it. It does foul up the build log though.
    Any JDev team members watching this topic are welcome to chime in with a confirmation and details of this apparent bug, as well as any workaround that might exist to avoid having the warning appear. Thanks!

  • Access JSP pages under WEB-INF

    Hello, I have a web application and i use Java,JSP, servlets etc.
    In my webpage i have three different categories of users
    *1)* Registered users
    *2)* Not Registered users
    *3)* Administrator
    I would like the welcome page index.jsp and register page be accessed by everyone.
    But as far as the other pages are concerned , i would like to be accessed only by the registered users.
    What shall i do??
    I placed the index.jsp and register.jsp under the public folder and the other pages under WEB-INF folder in order to be accesses only from the registered users.
    But it's not working!
    What exactly shall i do in order to make that work??
    Thanks, in advance!

    g_p_java wrote:
    Thanks for the link! As i understood i don't have to place my web pages under WEB-INF (only the web.xml which is already there).
    *1)* So i have to follow the steps that are being mentioned there for all the users right??
    Registered , Not Registered and admin.
    Yes, security constraining through web.xml is a url pattern based protection for your resources. You could create multiple urls - /secured/* and map them to your resources accessible to registered users only or you may have /admin/* and define that only 'admin' roles have access to these resources. Some portions of such setup would be server specific (eg: how you create users and map them to roles)
    *2)* I would like to make a question: Who is the "FrontController" in the link you posted me? [http://onjava.com/onjava/2001/08/06/webform.html]
    It's the Container. Because such features are mandated by the spec, the container provides an implementation and options to customize the implementation (for example in weblogic, you can specify that your users are bound to an LDAP or configured in a Users table in the db)
    Nevertheless, you would have your own Controllers for your application management (Struts or Spring or whatever suits your need). On the same note, you should have your own Filters to implement whatever common logic you have across your application.
    Madathil_Prasad wrote:
    2. Write a filter that checks for the presence of a session (and entitlements possibly) before allowing access to a resource.
    *3)* when you write "_entitlements_" what exactly do you mean??
    Thanks!
    This is the other road I was talking about. You could throw all configuration and j2ee based security configuration out of the window (they do have their limitations) and implement custom security logic in a Filter. For example,
    String urlPattern = request.getRequestURI();
    if(urlPattern.indexOf("/secured") != null{
             if(request.getSession(false) == null){
                   //redirect to login page.
             }else{
                  //valid session
                  //now check specific entitlement to see whether user has access
    }Here entitlement refers to permissions at a granular level (authorization if you wish to call it). For example, you have 2 kinds of admin users - some who can generate reports of web activity and another who can change application settings.
    ram.

  • Faces under WEB-INF

    Would I run into any problems if I chose to place jsf enabled jsp's under the WEB-INF folder to take advantage of the fact the files here cannot be directly accessed?
    I am thinking the faces servlet would be able to access them but I don't have much experience with JSF and don't want to take off in the wrong direction.
    Any thoughts?

    Originally posted by: merks.ca.ibm.com
    David,
    You'd likely be better to ask on the WTP newsgroup. I don't really
    understand the problem you are describing but I suspect that if it's not
    showing the content under that folder, it's showing the content
    elsewhere in the view of that same project. Certainly if you use
    "File->Show View->Navigator" it will show you more of a raw view of
    what's actually there...
    David wrote:
    > Hello,
    > I have a path displayed in the Package Explorer as
    > "WebContent/WEB-INF/src". I'd like to edit the faces-config file in
    > the WEB-INF directory. The trouble is that I can't list the contents
    > of the WEB-INF directory, because it's just displaying the slashes.
    >
    > When I use windows explorer to view the folders, I can see the
    > faces-config file listed under WEB-INF. It's just that Eclipse isn't
    > displaying the hierarchy the way that I'd like it to.
    > I know that this will be basic, but could I please get someone to
    > explain how to display it as a hierarchy (with little +'s) rather than
    > the path (with slashes).
    >
    > Thank you.
    >
    > David.
    >

  • Please help.! Problem with locating classes within Jars under WEB-INF/lib.

    Hi All,
    I have a problem which you guys would have faced already...Here it goes..
    I'm using OC4J 10.1.3.0 and use ADF for my web page. I have a controller class which refers to JSF/ADF APIs and this class is archived as a jar file and put under WEB-INF/lib, Also, all the classes related to JSF/ADF are available under the same WEB-INF/lib folder.
    When I invoke my page, the controller class is getting called but it throws NoClassDefFound Error for the ADF based class. i mean, these ADF/JSF classes are not getting found when my jar class is placed within WEB-INF/lib. However, when i extract my jar into WEB-INF/classes, it works.
    I'm sure, i miss some entry for classpath somewhere. Can any one please point me to right direction...?
    Thanks
    Rajasekaran

    Hello,
    I do not have a direct answer to your question, but could you try the ClassLoader query tools to see if your classes/jar are loaded by the applications:
    - Using Queries to Troubleshoot Class Loading Issues
    Regards
    Tugdual Grall

  • Error while accessing a war with xmlbeans under WEB-INF/lib

    Hi All,
    I am trying to deploy a WAR file with XMLBean generated jar under WEB-INF/lib folder along with other jars.
    I am getting following error
    java.lang.NoClassDefFoundError: com/xx/DataServiceRequestDocument
         at java.lang.Class.getDeclaredFields0(Native Method)
         at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
         at java.lang.Class.getDeclaredField(Class.java:1880)
         at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1610)
         at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
         at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:425)
         at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:413)
         at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:310)
         at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:547)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
         at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2216)
         at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2347)
         at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2290)
         at com.tangosol.io.DefaultSerializer.deserialize(DefaultSerializer.java:74)
         at com.tangosol.coherence.component.net.extend.Channel.deserialize(Channel.CDB:15)
         at com.tangosol.io.pof.PofBufferReader.readAsObject(PofBufferReader.java:3306)
         at com.tangosol.io.pof.PofBufferReader.readObject(PofBufferReader.java:2603)
         at com.tangosol.coherence.component.net.extend.messageFactory.InvocationServiceFactory$InvocationRequest.readExternal(InvocationServiceFactory.CDB:5)
         at com.tangosol.coherence.component.net.extend.Codec.decode(Codec.CDB:29)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.decodeMessage(Peer.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.onNotify(Peer.CDB:54)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:662)
    I tried multiple combinations like changing, but no success.
    <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3.2</wls:weblogic-version>
    <wls:context-root>CoherenceWS</wls:context-root>
    <wls:container-descriptor>
    <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
    </wls:container-descriptor>
    </wls:weblogic-web-app>
    I have very few classes in WEB-INF/class (trying to load java objects from lib)
    My WEB-INF/lib folder contains following jar
    coherence.jar
    commons-beanutils-1.8.0.jar
    commons-collections-3.2.jar
    commons-lang-2.4.jar
    commons-logging-1.1.1.jar
    dsRemoteCall.jar
    ezmorph-1.0.jar
    jackson-all-1.8.5.jar
    json-lib-2.1-jdk13.jar
    org.springframework.asm-3.1.0.M2.jar
    org.springframework.beans-3.1.0.M2.jar
    org.springframework.context-3.1.0.M2.jar
    org.springframework.core-3.1.0.M2.jar
    org.springframework.expression-3.1.0.M2.jar
    org.springframework.oxm-3.1.0.M2.jar
    org.springframework.web-3.1.0.M2.jar
    org.springframework.web.servlet-3.1.0.M2.jar
    schemaclasses.jar
    xbean.jar
    xom-1.2.7.jar
    Am I missing something? Any help is greatly appreciated
    Thanks
    sunder
    Edited by: 868704 on Sep 6, 2011 6:10 PM

    Note : schemaclasses.jar contains "com/xx/DataServiceRequestDocument" class file.
    WebLogic Server 10.3.5.0
    Thanks
    sunder
    Edited by: 868704 on Sep 6, 2011 6:26 PM

  • [weblogic 8.1-sp4] taglibs not allowed any other place then under WEB-INF?

    i pack my application as EAR with several skinny WARs + JAR libs under "lib" directory of EAR (and ofc WARs have their manifest adjusted to point to those). standard.jar is also there, no web.xml definition of the taglibs.
    when i deploy the EAR, any of the JSPs throw famous IOException: "cannot resolve 'http://java.sun.com/jstl/core' into a valid tag library".
    i dug a bit and saw people mention that TLDs are scanned for only when they are placed under WEB-INF of a WAR (hence you suck when your TLDs are somewhere else like "/lib" in my case) and classpath has nothing to do with that. is it true and what can be done to avoid it?
    ps.
    to clarify: servlets 2.3; jstl 1.0; jsp 1.2
    Edited by: [email protected] on Dec 8, 2008 6:33 PM

    well placing 10 taglib definitions in each web.xml is imho a bad idea. as there's no real way to exclude all but certain JARs from a WAR using maven (the ideal solution i'd prefer), the solution i had to choose was to set maven-dependency-plugin up the way it would extract the TLDs from certain JARs and place it anywhere under WEB-INF of the WAR when it's assembled. the cons is that TLDs are duplicated, but on the other hand the configuration for that is minimal (which also seems important to me).

  • DefaultServlet bug? forwarding to static content under WEB-INF

    I've encountered what seems to be a bug in the DefaultServlet in WebServer 7.0u2, when trying to do a requestDispatch->forward to static content (e.g., a .png file) under WEB-INF. In general, I can forward into content under WEB-INF, and my servlet works fine when forwarding to dynamic content under WEB-INF (e.g., a .jsp file), but when I try to forward to static content, a 404 error is sent. The same servlet also works fine if I put the static content outside of WEB-INF. In summary:
    forwarding to /WEB-INF/foo.png responds with error 404 (even though the content exists)
    forwarding to /WEB-INF/foo.jsp works fine
    forwarding to /other-dir/foo.png works fine
    I'm baffled as to why I can't forward to static content under WEB-INF. I have a very simple web.xml file, and no suffix-based mappings, so the only servlet that should be responding to the forward is the servlet container's DefaultServlet. Is there some bug in DefaultServlet? Am I misunderstanding something?

    pl. upgrade to latest update (web server 7 u5 as of now) and see if your problem is still reproduced.

  • Isp file under WEB-INF call css file and jasript file

    Hi , is that OK to call a jascript file or css file if the jsp file is under WEB-INF? How to do that?

    You have to remember that all client side requests will be of 2 types: relative or absolute. If you refer to the file using the absolute URL of the resource (like http://www.my.com/application/resources/content.css) then you will have no problem.
    If you use a relative URL, the URL has to be relative to the address that the client sees on the browser. The JSP may be in the WEB-INF directory, but the client doesn't see that. They put in a URL like http://www.my.com/application/process and the server included/forwarded to the WEB-INF content which the client doesn't see or know about. So when you use a relative URL, the URL has to be relative to http://www.my.com/application/process and not to http://www.my.com/application/WEB-INF/<...>/display.jsp where the JSP actually lives.

  • When is it mandatory to create a taskflow under WEB-INF folder?

    Hi,
    Today, I accidentally created a taskflow with a folder structure which is not under WEB-INF. To my surprise it is working. :)
    1) Is it safe practice to create a taskflow not under WEB-INF folder?
    2) When is it mandatory to create a taskflow under WEB-INF folder?
    Thanks,
    Srini

    Placing the taskflow in a) inside WEB-INF or b) outside WEB-INF folder will work as expected.
    But when a taskflow is placed inside the WEB-INF folder, it is secure.
    The blog post by Andrejus Baranovskis (http://andrejusb.blogspot.com/2011/02/beware-of-hackers-keep-adf-task-flows.html) suggested by Vinod has the detailed information regarding this.
    Thanks,
    Navaneeth

  • Appc does not compile JSPs under WEB-INF

    Hi,
              We are using WLS 8.1 and I noticed that appc does not compile jsps that are
              under WEB-INF. Is this expected? If the jsps are outside of WEB-INF then
              appc works fine...
              Thanks!
              John
              

    Although the client is not allowed to directly access jsps under WEB-INF, it
              is perfectly acceptable (and often recommended) to use a front controller to
              forward to jsps. Often these jsps are "hidden" in the WEB-INF directory so
              that they can't be accessed directly by the client. This pattern works fine
              under 8.1 except that appc won't precompile the jsps under WEB-INF (the
              container does compile the jsps when they are called). I believe this is a
              bug... If jsps are allowed in WEB-INF then appc should compile them...
              John
              "Stjepan Brbot" <stjepan.brbot@@zg.hinet.hr> wrote in message
              news:[email protected]...
              > Yes, this is expected! Web container, or better to say it's web component,
              > does not serve content of WEB-INF directory directly mening you cannot
              > access jsp inside WEB-INF like
              http://host:port/WebApp/WEB-INF/something.jsp
              > hence there's no need for compiling JSP's in it! The content of WEB-INF
              > directory can be accessed only via internal links so it is mostly used for
              > referencing taglibs. JSPs, HTMLs, images and all other file type that has
              to
              > be accessible directly by client web-server (not container internally)
              > should be in application directory or one of it's subdirectories.
              >
              > "John Hampton" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hi,
              > >
              > > We are using WLS 8.1 and I noticed that appc does not compile jsps that
              > are
              > > under WEB-INF. Is this expected? If the jsps are outside of WEB-INF
              then
              > > appc works fine...
              > >
              > > Thanks!
              > > John
              > >
              > >
              >
              

  • JAR files under WEB-INF but not in lib directory

    I am working with JDeveloper 10g and I have several jar files under WEB-INF/lib and other under WEB-INF/libEst.
    I have add this libraries to Project properties > Paths and it works fine when I run my aplication in local environment, but it fails when I deploy and run in the server.
    I have configured our deploy file to include these WEB-INF/libEst jar files, but when I deploy to our server, it seems to be that this classes included in these jar files are not reachable and they cannot be loaded and throw a ClassNotFoundException.
    Is it possible to have jar files under any WEB-INF subdirectory distinct of /lib?
    Why is it working in local but not in server?
    If someone can help me to configure this in order to deploy in server, I will be very grateful.
    Thanks a lot,
    Antonio.

    Hi Antonio,
    I think this document is what you are looking for: http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-servlet-warmanifest.html
    .. your manifest entries would look like
    Class-Path: WEB-INF/libExt/<jarName1>.jar, WEB-INF/libExt/<jarName2>.jar, ...
    Let me know if this works for you.
    thanks,
    Harsha

Maybe you are looking for

  • "Washed out" screen after waking from sleep?

    Over the past couple of months, when either waking from sleep or coming off the screen saver, the display has a washed out look to it. The colors can be restored by either reinitializing the screen saver or putting the computer to sleep and waking it

  • Custom popup menu + graphic ring

    Hi, I have two questions. 1) Could anyone give me an example how to create my own popup menu by clicking the right mouse button over an item. 2) Does anybody know how to disable the border an the background of a graphic ring item. I what to display d

  • Has a recent change in thunderbird hampered thunderbird from accepring certificates from godaddy

    sometime after 1/27/2015 9:53 PM thunderbird ceased collecting mail from one of my pop3 accounts. The cause appears to be that thunderbird will not accept an apparently valid certificate issued by godaddy. This is the email account I use for business

  • Link Maintenance Orders to Capitalize Asset

    Hi friends I'm implementing the SAP PM Module. We are doing maintenance to a diferent kind of equipments. The most important one, are trucks. These trucks are very expensive, so they are linked with asset. Now imagine this: We open a Maintenance orde

  • Not enough extra media . . . to create the transition (but there IS)

    Any idea why I would get this message when the clip's on the Primary Storyline, and clearly has at least 25 seconds of footage spare on both adjacent clips? It's 720p 50 XDCAM footage shot at 50 fps on a 25 fps timeline - and I've ditched the prefere