2 Replies Latest reply on Aug 22, 2003 8:16 AM by twutort

    Configuring the context to "/"

    valsummers

      Hi,
      I am trying to configure my application to the "/" context. Rather than using server.com/myapp I would like to access it as simply server.com.

      I tried configuring thru the jboss-web.xml but it doesn't work.

      I am using JBoss 2.4.4-Tomcat4.0.1 and my app is an exploded war folder.

      I get the following error on trying the server.com/ URL :

      [INFO,EmbeddedCatalinaServiceSX] StandardHost[localhost]: MAPPING configuration error for request URI
      [ERROR,EmbeddedCatalinaServiceSX] HttpProcessor[8089][4] process.invoke
      java.lang.NullPointerException
      at org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.java:280)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:180)
      at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

      Any ideas?

      Thanx

        • 1. Re: Configuring the context to "/"
          shortpasta

          Create a jar called myapp.ear.
          create a file called META-INF/application.xml & place it in myapp.ear.

          application.xml:
          <?xml version="1.0" encoding="ISO-8859-1"?>


          <display-name>myapp</display-name>



          <web-uri>myapp.war</web-uri>
          <context-root>/</context-root>




          I deploy my war separately from the ear. you can place the war inside the ear.

          • 2. Re: Configuring the context to "/"
            twutort

            Hello, I want to do the same thing. However, when I use an include file or some other relative path in my JSPs I have to put wwwroot in front of the path. LIke this:

            <%@ include file="/wwwroot/includes_jsp/ADMIN/sniffer.shtml" %>


            I have the following settings:



            <web-uri>SimShop.war</web-uri>
            <context-root>/</context-root>




            Is there any way I can set this up so I don't have to have wwwroot in the relative path? Si I can load it like this:

            <%@ include file="/includes_jsp/ADMIN/sniffer.shtml" %>

            Thanks,
            Tim