[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Serving Static Content (ROOT.war, context root, virtual host

rcherchi do-not-reply at jboss.com
Thu Jun 26 05:33:34 EDT 2008


I folks,

I use jboss 4.0.5GA and seam 1.2.1.GA.

I would like to serve static content in ROOT.war (images, javascript libraries... etc) for my app. Howerver, it is not reachable when my context root is / When I change the context root to myapp it's fine, I can load files in ROOT.war.

But now, my application is available at http://localhost:8080/myapp (before it was http://localhost:8080 so I get many path and links)

I tried to create a virtual host to solve this problem. However, I can't figure out how to get http://myapp.mydomain.com mapping http://localhost:8080/myapp. My application is now available at http://myapp.mydomain.com/myapp !

Here is my configuration :

jboss-web.xml

<virtual-host>myapp.mydomain.com</virtual-host>	

application.xml


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

server.xml

 
  | <Host name="myapp" 
  |                         autoDeploy="false"
  |                     deployOnStartup="false" 
  |                     deployXML="false">
  |                   
  |                         <!-- Aliases -->
  |                         <Alias>myapp.mydomain.com</Alias>
  |                         
  |                         <!-- Set up loggin -->
  |                   <Valve className="org.apache.catalina.valves.AccessLogValve"
  |                          prefix="myapp-" suffix=".log" pattern="common"
  |                          directory="${jboss.server.home.dir}/log"/>
  |         
  |                   <DefaultContext cookies="true" crossContext="true" override="true"/>
  |               </Host>
  | 
  | 	

Any idea ?

Thank you ! 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160780#4160780

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160780



More information about the jboss-user mailing list