Context path

I have a web app in a war called my_war which is in an ear called my_ear
I have a jsp page called hello.jsp in directory "dude" (i.e. the directory structure in the war has a directory /dude with hello.jsp in it)
So to get to this page in my browser, I type
http://ip_address/my_ear/dude/hello.jsp
Note that by default, it uses the ear name which seems pretty sensible.
If I put <%=request.getContextPath()%> in this jsp page, I get "/my_ear"
This is also what I expected and I'm happy so far, I will refer to this value as the "context path"
Now say I have another jsp page dude2/booya.jsp
I want an html link between the 2.
I could get this by <%=request.getContextPath()%>/dude2/booya.jsp
I know I could also probably go ../dude2/booya.jsp, but I'd rather not.
To make my design a bit nicer, I would prefer to avoid calling <%=request.getContextPath()%> each time I want to get the context path. I'd rather store it globally. It can't change right?
Is there a way to get the context path on deployment of my web app.
e.g from the init method of a servlet that is set to load-on-startup

The context path can change if you deploy the war or ear differently. There is a context path setting in application.xml in the ear's META-INF. Your best bet is to use inheritance. You can make your JSPs/servlets extend a base servlet which could add another parameter to the service signature. That's kinda how JSP gets its other auto defined locals like request, response, and out. The downside is that you'd have to declare the new method in your JSPs unless you wanna get into creating/modifying the JSP servlet generator. I dunno, maybe that's not such a hot idea after all.
Cliff

Similar Messages

  • Table error - Context Path Cannot Be Resolved (Last Node Is Empty)

    Hi All,
    I am dynamically building up a context node called PoList which is used to hold the contents of a table.
    My BAPI is called and a routine transfers the contents of the BAPI context node across into the POList context node. This is rendered correctly on the screen. There is a routine which filters the results based on a vendor. The code works fine when some records are found but when no records are found, I get the error "Context Path POLIST.EBELN Cannot Be Resolved (Last Node Is Empty) ".
    The cardinality of the PoList node is 0..N. This should mean that 0 records is valid.
    The ABAP which fills the context is pasted below :
    data:
        Node_Z_Bapi_Po_Combined             type ref to If_Wd_Context_Node,
        Node_Changing_Po                    type ref to If_Wd_Context_Node,
        Node_T_Header                       type ref to If_Wd_Context_Node,
        Elem_T_Header                       type ref to If_Wd_Context_Element,
        itab_C_T_Header    type If_Componentcontroller=>Elements_Polist,
       stru_C_T_Header    like line of itab_C_T_Header,
        Stru_T_Header                       type If_Componentcontroller=>Element_T_Header .
      data:
        Node_Polist                         type ref to If_Wd_Context_Node,
        Elem_Polist                         type ref to If_Wd_Context_Element,
        Stru_Polist                         type If_Componentcontroller=>Element_Polist.
      data:
    lri_Element    type ref to if_Wd_Context_Element,
    loa_Elements   type Wdr_Context_Element_Set.
    navigate from <CONTEXT> to <Z_BAPI_PO_COMBINED> via lead selection
      Node_Z_Bapi_Po_Combined = wd_Context->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Z_Bapi_Po_Combined ).
    navigate from <Z_BAPI_PO_COMBINED> to <CHANGING_PO> via lead selection
      Node_Changing_Po = Node_Z_Bapi_Po_Combined->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Changing_Po ).
    navigate from <CHANGING_PO> to <T_HEADER> via lead selection
      Node_T_Header = Node_Changing_Po->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_T_Header ).
    navigate from <CONTEXT> to <POLIST> via lead selection
      Node_Polist = wd_Context->get_Child_Node( Name = IF_COMPONENTCONTROLLER=>wdctx_Polist ).
      loa_Elements = node_T_Header->get_Elements( ).
      loop at loa_Elements[] into lri_Element.
        lri_Element->get_Static_Attributes(
          importing Static_Attributes = stru_C_T_Header ).
    Get the vendor number
        if i_lifnr is initial.
          insert  stru_C_T_Header into table itab_C_T_Header[].
        elseif i_lifnr = stru_c_t_header-lifnr.
          insert stru_C_T_Header into table itab_C_T_Header[].
        endif.
      endloop.
      data : W_LINES TYPE I.
      describe table itab_c_t_header lines w_lines.
      if w_lines eq 0.
        node_Polist->set_lead_selection_index( 0 ).
        CALL METHOD NODE_POLIST->INVALIDATE.
      else.
        node_Polist->bind_Table( itab_C_T_Header ).
        clear itab_C_T_Header[].
      endif.
    I would have though that invalidating the node would blank the context node and mean that the table is empty but instead I get an error.
    Please help.
    Richard

    Hi Richard,
    The problem here is that some UI element tries to bind against a node where the parent node is empty. You have to make sure that the last but one node has at least 1 element, otherwise you should hide the UI element (visibility = NONE).
    If the lead selection were empty, the corresponding error message would tell you this, but it explicitely says: "Last Node is Empty", and you can trust it.
    One possibility to have at least one element in the node is to change the cardinality to 1..n. If you have a supply function for this node, you have to make sure that there is at least 1 element (bind empty structure to the node), otherwise the framework creates the first element for you.
    Ciao, Regina

  • Finding the context path or docBase in a backing bean - Howto

    How should I go about finding the context path or docBase in a backing bean?
    Is there anyway to get this from glassfish or jsf? GlassFish proudly displayed it on the Application Server > Applications > Web Applications > page. It puts it there with an EL for example:
    ${com.sun.aas.instanceRoot}/applications/j2ee-modules/jsf-witaCan and/or should I try to use it in a backing bean? i.e. can I rely on it to stay defined?
    Or should I make a property which I can set for my backing work?

    Is this what you want?
    FacesContext.getCurrentInstance().getExternalContext().getContext()

  • Getting the context path in a jspx

    Greetings
    i have in a JSP this code
    <div id="footerpartners"><img src="<%=request.getContextPath()%>/images/aval.png" width="68" height="26" /><img src="<%=request.getContextPath()%>/images/ath.png" width="79" height="26" /><img src="<%=request.getContextPath()%>/images/ciudad_empresarial.png" width="133" height="26" /><img src="<%=request.getContextPath()%>/images/corficolombiana.png" width="140" height="26" /><img src="<%=request.getContextPath()%>/images/superfinanciera.png" width="181" height="26" /><img src="<%=request.getContextPath()%>/images/verisign.png" width="72" height="26" /></div>
    and this JSP is being include in a JSPX, when loading the JSPX in my browser i am getting this error
    Error de OracleJSP: oracle.jsp.parse.JavaCodeException:Line 3, oracle.jsp.parse.JspParseTagExpression@190fd9b
    Error: Java code in jsp source files is not allowed in ojsp.next mod
    i believe it is because of the contextPath request....................how can i get it in a jspx

    resolved at Getting context path in a jspx

  • Get context path in a jsp without using a scriptlet

    Hi Guys
    I am using Scriptlet to get a application context path in a JSP. I want to get the context path with out using an scriptlet in a JSP, is there way to achieve this..?
    <%=request.getContextPath() %>/listofvalues.do?method=viewListOfValues thanks in advance.
    Regards
    Praveen
    Edited by: praveen_kumarvr on Jul 3, 2008 8:30 AM

    ${pageContext.request.contextPath}A common practice is to put this value in the <base href> in the HTML head and then use this as the root for all of the relative URL's in the page.

  • Trobule in saving log in file which is in my context path

    Hello all, i am facing problem while saving log into Log file from servlet. I am using Log4j library and eclipse as IDE. When i push any log information to log file, it make log file default to eclipse path not in my servlet context path. I am using log4j.properties file for configuration. Which has following contents :
    log4j.rootLogger=DEBUG, FA
    log4j.appender.FA=org.apache.log4j.FileAppender
    log4j.appender.FA.File=log.txt
    log4j.appender.FA.layout=org.apache.log4j.PatternLayout
    log4j.appender.FA.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
    and servlet code for configuring properties file is : PropertyConfigurator.configure(context.getResource("/log4j.properties"));
    what when i push content to log.txt it create file in my eclipse path. How can i set the file path as my context path for log.txt?
    thanks in advance.
    sanjeev

    I don't know such way. But maybe You can read the file when application starts (in ServletContextListener) and change this property when it's already running. Don't know if this helps, but may try.

  • How do I get context path in javascript?

    Hi,
    I code the following code but the contextPath will return a string = <%=request.getContextPath()%> instead of returning the context path. The codes works on a normal jsp form. Please help. Thanks.
    <script>
    <contents>
    var contextPath = "<![CDATA[<%=request.getContextPath()%>]]>";
    function doAction( action ){
    if( action == "clear" ){
    document.GnCodeSetupForm.action= "clearGnCodeSetupAction.do";
    document.GnCodeSetupForm.submit();
    </contents>
    </script>

    var contextPath = "<![CDATA["+<%=request.getContextPath()%>+"]]>";
    will return following code
    var contextPath = ""+<%=request.getContextPath()%>+"";
    which is syntax error.

  • Request context path for portlet has wrong port number

    I have a JSF application deployed as a portlet on the WLS_Portlet domain with port 8889. The portlet is being consumed in WebCenter Spaces, which lives in the WLS_Spaces domain with port 8888.
    In my code, I am trying to get the request context path:
    FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
    I expect this to return http://host:8889/contextroot (where I am able to access my app resources). Instead, it is returning http://host:8888/contextroot.
    Any ideas why this is happening?
    Edited by: user9171296 on Jun 16, 2010 10:32 AM

    Hi,
    if you expeience Web Center problems, then best is to get an answer on the Web Center forum: WebCenter Portal
    Frank

  • After changing the context path, felix console, I can not checkout content via vlt.

    Hi everyone,
    I have the following issue. After changing the context path, via felix console, I can not checkout the content via vlt. Before that, I could checkout without any problems.
    I am using CQ5.5, CRX2.3, context path: /Test
    That is what I am trying:
    vlt -v --credentials admin:admin co http://localhost:23310/Test/server/crx.default
    Connecting via JCR remoting to http://localhost:23310/Test/server
    [WARN ] Authentication required to access repository descriptors
    [ERROR] checkout: com.day.jcr.vault.vlt.VltException: Unable to mount filesystem
    caused by: javax.jcr.ItemNotFoundException: Not Found
    caused by: org.apache.jackrabbit.webdav.DavException: Not Found
    Other versions I tried:
    vlt -v --credentials admin:admin co http://localhost:23310/crx
    vlt --credentials admin:admin co http://localhost:23310/Test/server
    vlt --credentials admin:admin co http://localhost:23310/Test
    vlt --credentials admin:admin co http://localhost:23310/Test/crx
    To verify if I could connect to the instance properly I started CRXDE
    and try to connect to "http://localhost:23310/Test"
    After click the ok button I got that error:
    No file system is defined for scheme: jcr
    Part of the .log file (.crxde):
    eclipse.buildId=unknown
    java.version=1.6.0_37
    java.vendor=Apple Inc.
    BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
    Framework arguments:  -keyring /Users/peterwimsey/.eclipse_keyring -showlocation
    Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/peterwimsey/.eclipse_keyr
    ing -showlocation
    !ENTRY org.eclipse.core.resources 2 10035 2012-11-25 19:01:19.268
    !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to
    recover changes.
    !ENTRY org.eclipse.osgi 4 0 2012-11-25 19:04:14.363
    !MESSAGE Application error
    !STACK 1
    java.lang.reflect.InvocationTargetException
            at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121)
            at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62)
            at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau
    ncher.java:110)
            at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav
    a:79)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
            at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
            at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
            at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    Caused by: org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr
            at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
            at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)
            at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65)
            at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107)
            at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350)
            at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100)
            at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6)
    Any tips or hints are welcome.
    In the case you need more information, just leave a note.
    Thanks in advance for your help.
    Best regards,
    Peter

    The VLT works fine with the above URL change but How to fix "CRXDE" Initialization error if a context path is defined?
    I have a context path defined /Test and when I am trying to login to CRXDE with URL as http://localhost:4502/Test, I am getting below Initialization Error.
    Any workaround as Which URL should work while logging to repository (with context path) using CRXDE 1.0.1
    eclipse.buildId=unknown java.version=1.6.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments:  -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.osgi 4 0 2013-04-25 17:50:23.802 !MESSAGE Application error !STACK 1 java.lang.reflect.InvocationTargetException at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121) at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
    Caused by: org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr
    at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107) at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350) at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100) at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6) at com.day.cq.ide.init.SetupWorkspaceOperation.execute(SetupWorkspaceOperation.java:119) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) ... 13 more Root exception:
    Thanks.

  • Multiple Context Paths Per Web Application

    Hi,
    We have a Web Application which has a Context Path of "titanadmin". We have some
    HTML pages which refer to this within the URLs they contain. We need to move the
    functionality in this Web Application to another Web Application with a Context
    Path of "gp3admin". We cannot change the URLs in the generated HTML.
    So, is it possible for a Web Application to have multiple Context Paths, so that
    URLs starting with "/titanadmin/" and "/gp3admin/" both go to the same Web Application.
    Thanks,
    Dave

    There is no hard limit to the number of Web Applications (I managed a WSSv3 farm that had 60+, for example). The issue is memory-related and primarily stems from 32bit systems where it was much easier to get Out Of Memory errors on the IIS Application Pools
    when performing a large operation across a 32bit Application Pool (e.g. crawling). However, if you limit each IIS Application Pool to about 10 Web Applications (again, in 32bit land that no longer applies), everything generally works OK given the Web Applications
    do not have a very large amount of content.
    But, if HNSC is in use, a single Web Application should be sufficient, barring any Web Application-specific settings you might need to make.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Deployment Failure: Context path already in use

    I am trying to deploy a webservice using a stateless session EJB, similar to the
    "trader" example that comes with weblogic 8.1. I used the "trader" source files
    as a blueprint for my implementation... the service builds successfully via ant,
    but the following error shows up in the server console:
    <Error> <Deployer> <BEA-149201> <Failed to complete the deployment task with ID
    6 for the application appsdirwebservice_modelread_ear.
    weblogic.management.ApplicationException:
    Exception:weblogic.management.ApplicationException: prepare failed for webservice
    Module: webservice Error: Context path 'webservice' is already in use by
    the module: webservice application: appsdirwebservices_trader.ear
    What exactly is the "context path", and what do I have to change in the .properites
    or build.xml (or other) files in order to avoid this error?

    I do not know Contribute 2, but what I do know that in later
    versions of the program, this message means that you have another
    connection in Contribute pointing to the same webaddress.
    Check this by doing the following:
    1. in the main menu go to Edit>My Connections
    2. check all connections there to find the path you described
    3. delete or adjust this connection

  • How to set the servlet context path manually in Tomcat web server.

    I tested some servlets by putting them in the folder , which the tomcats examples application uses (ie Tomcat 4.1\webapps\examples\WEB-INF\classes\) and it appeared to be working fine.
    I was calling the servlet like this : http://localhost:2006/examples/servlet/TestServlet
    But when I installed my own WAR file in the server , the servlet is not working now. now the new location of my servlets is : Tomcat 4.1\webapps\MyApp\WEB-INF\classes\
    and I'm trying to call the servlet like this : http://localhost:2006/MyApp/servlet/TestServlet
    The error , what i'm getting is :
    description :The requested resource (/MyApp/servlet/TestServlet) is not available.
    Some body please tell where I'm making the mistake ? I believe this may have something to do with the servlet context path setting. If anybody has any idea , how to set the path..will be much appreciated.

    Thanx for your reply , at first I was not using any web.xml(since not mandatory) but even after using the web.xml file the error is coming . Please have a look into the contents of the web.xml file and let me know if you find any problem...
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>TestServlet</servlet-name>
    <servlet-class>TestServlet</servlet-class>
    </servlet>
    </web-app>
    one more thing I would like to tell you here. I was just looking into the configuration of Iplanet web server..I found that , there are options to set the servlet container path (like : - Prefix: /servlet
    Servlet Directory: /ecomm/iplanet/nes60/product/docs/container )
    so from here I came to know that "container " is the folder where we should put our servlets and it has URI as "servlet" but yet I'm not able to find any option in the Tomcat Web server to set the servlet container to any different directory.
    If you have any idea please let me know.

  • How-to get the JSF application context path?

    I want to do a redirect from within a JSF backing bean. How do I get the application context path?
    I plan to do this in the constructor of the backing beans in order to validate the user has previously logged in.
    public BackingBeanName()
    FacesContext facesContext = FacesContext.getCurrentInstance();
    HttpSession session = HttpSession)facesContext.getExternalContext().getSession(false);
    HttpServletRequest request = (HttpServletRequest)facesContext.getExternalContext().getRequest();
    userid = (String)session.getAttribute("userid");
    if (userid == null) {
    logger.info("userid attribute is not in session");
    ExternalContext ec = facesContext.getExternalContext();
    appContextPath = ???????????????????????;
    String redirectTo = appContextPath + "/logon.jsp";
    try {
    ec.redirect(redirectTo);
    catch (IOException e) {
    String msg = "redirect to " + redirectTo + " failed";
    logger.severe(msg);
    return; // throw an exception instead of return;
    Regards,
    Al Malin

    Frank, your suggestion of using JSF global navigation to the logon page looks like what I need but I need some advice implementing it.
    My backing bean constructor looks like this:
    public Search()
    FacesContext facesContext = FacesContext.getCurrentInstance();
    String userid = GpaUtil.getSessionUserid(facesContext);
    if (userid == null)
    logger.info("session userid not found, going to logon page");
    ??????? What goes here ????????
    ??????? I think I need to fire an event but I'm not sure how to do it, ????????
    ??????? let alone if this is what needs to be done ????????
    ??????? or even if this is the right spot in the code ????????
    gpas = ProductApproval.retrieveList("1=1","1");
    FWIW, the navigation rule looks like this:
    <navigation-rule>
    <navigation-case>
    <from-outcome>goLogon</from-outcome>
    <to-view-id>/logon.jsp</to-view-id>
    </navigation-case>
    </navigation-rule>
    Your help is greatly appreciated.
    Regards,
    Al Malin

  • h:outputLink with context path?

    Hey,
    give it anyway to set an flag in the <h:outputLink> tag to copy the context path automatic on the beginning of the value from outputLink or must I write my own component?

    No flag like that... I'm not actually sure what the problem is here though. It definitely sounds like you don't need a custom component though!
    What's wrong with just binding the value attribute to your backing bean, and let the bean figure out what your context root is?
    CowKing

  • Form action context path

    Hi all.
    I have a strange problem, that I hope some of you can help me with.
    First of all let me explain my setup:
    1. I have a faces page, that in an action method does a redirect to a different server.
    2. That server then redirects back to a Servlet on my application server.
    3. The Servlet then forwards to one of my own faces pages. (same context)
    4. Page is displayed, BUT the form tag is now rendered like this:
    <form id="form1" method="post" action="/app/servlet/testpage.jsp">
    should have looked like this:
    <form id="form1" method="post" action="/app/testpage.jsp">
    Somehow the Servlet (context?) is added to the context path???
    More info:
    The way I do the forward in step 3, is like this:
    LifecycleFactory lFactory = (LifecycleFactory) FactoryFinder
                        .getFactory(FactoryFinder.LIFECYCLE_FACTORY);
              Lifecycle lifecycle = lFactory
                        .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
              FacesContextFactory fcFactory = (FacesContextFactory) FactoryFinder
                        .getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
              FacesContext facesContext = fcFactory.getFacesContext(
                        getServletContext(), request, response, lifecycle);
              Application application = facesContext.getApplication();
              ViewHandler viewHandler = application.getViewHandler();
              String viewId = "";
              UIViewRoot view = viewHandler.createView(facesContext, viewId);
              facesContext.setViewRoot(view);
              String outcome = "ok";
              NavigationHandler navigationHandler = application
                        .getNavigationHandler();
              navigationHandler.handleNavigation(facesContext, null, outcome);
              lifecycle.render(facesContext);Guess that's might be a cause to the problem?
    Have tried a plain servlet forward (and then no additional context is added..., BUT causes lots of other problems)
              request.getRequestDispatcher("xxx").forward(request, response);Will really appreciate some input on this.
    Thanks in advance.
    Edited by: mikfu on Jan 5, 2009 9:44 PM

    Hi - me again.
    Can anybody tell me is this should be the expected behaviour for such a setup?
    I tried another setup, where I redirect to a page within the same application context, and is still getting same problem.
    Thanks.

  • FAIL - Application at context path /webapp could not be started

    Hi,
    I have the code under c:\my_name_ccview\source\code\MyWebApplication.
    I use Netbeans 5.5.1 and bundled tomcat 5.5.17. I can compile and build the MyWebApplication.war file.
    In the context file I defined <Context path="/webapp">
    </Context>
    When I try to deploy it to the bundled tomcat I get the error FAIL - Application at context path /webapp could not be started.
    I also tried building the application and then try Run Debug without deploying application. Still the same problem. My application wont start. When I check the runtime tab on netbeans and check applications under bundled tomcat I see /webapp -[stop]
    Please any help is much appreciated

    What you should do is test ur application by deploying it in the examples folder of tomcat and them try to run it and it will work. But this is only the temporary solution.

Maybe you are looking for

  • Problems syncing photos from iphoto to ipod via itunes

    I have been having some difficulty getting my itunes to sync iphoto contents to my ipod. This worked fine for ages, but has just stopped working. I can sync photos from a standalone folder. Following a discussion on the ipod forum (for full details s

  • Question about Workspace and Trash

    Hi, does anybody knows if it is possible that i can create a Workspace where the Files did not stored in the Trash if anybody delete them? regards Peter

  • Screen EXIT - Not getting TKNUM value in any of the include

    Hi All, In my requirement, 1. I need a copy screen 2800 of function group LMOB into Custom screen 9800(subscreen) of Function group XLRF. - done. 2. Created the variant 1 for the custom screen 9800 3.I need to check the shipment status based on the s

  • BADI Name for adding PR item tab.

    Hi, Can anybody tells me the BADI name and procedure to addl PR item tab to insert/change the required data.  The fields that should be displayed should be dependant on the PR document type selected.  These fields should be changeable when the change

  • Office 2007 trial...

    Hello,         I just ordered a T61p last night with an estimated ship dater of 7/3/08.  Can't wait! I currently have Office 2007 Professional installed on my Inspiron 9100.  I will reformat my old I9100 and sell it. My question is... Will I need to