File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes setup context under Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "setup context under Tomcat " Watch "setup context under Tomcat " New topic
Author

setup context under Tomcat

riaz rahman
Greenhorn

Joined: Nov 28, 2005
Posts: 17
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

In your web app war file just include a jboss-web.xml which sets the context url.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
riaz rahman
Greenhorn

Joined: Nov 28, 2005
Posts: 17
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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

Joined: Nov 28, 2005
Posts: 17
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setup context under Tomcat
 
Similar Threads
Connection Pool that is local to my application
Directory listing context docBase
Context paths always coming up as "The requested resource is not available"
Virtual Directory
setup context under Tomcat integrated with JBoss