Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setup context under Tomcat

 
riaz rahman
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
In tomcat 5.x i want to setup context inside my war directory (not in server.xml).
because my application will be deployed after server started.
so any change in server.xml is not reflected till server is restarted.


For example, I want to map D:\files\set1 to http://localhost/docs.
(not through server.xml)

Best regards...
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your web app war file just include a jboss-web.xml which sets the context url.

Mark
 
riaz rahman
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi mark,

i have specified in jboss-web.xml like this



but this is not properly working.i think i an doing some mistake.please help me.

with regards
Riazur Rahman
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question, but I don't see anything, but it could be a simple spelling or path problem. But at this point it goes beyond my knowledge. I can just set the URL.

Mark
 
riaz rahman
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi mark,

I think mapping static content as above is not possible inside web application folder (is possible only in server.xml). so i have changed my servlet coding to handle the request.

thanks for your kindly replay.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic