Moose Moose
Moose Moose

Reputation: 267

how can I let tomcat look in another ROOT folder

Is it possible for me to start my web application from somewhere else than the ROOT folder in tomcat? I've build my app in eclipse, and this is the structure

web
    WEB-INF
        build
            mypackage 
                HomeServlet.class
        web.xml 
    home.jsp

would it be possible for me to just run tomcat from the tomcat folder, and have this app run at localhost/app?

NOTE: I'm not looking to run tomcat through my IDE. I know that it's possible, but I looking to run tomcat as a standalone application

Upvotes: 0

Views: 199

Answers (1)

Michel Feldheim
Michel Feldheim

Reputation: 18250

Add the path to your web.xml like this

<Context path="/" docBase="/your/absolute/document/root" />

More details on the context container you find here

Upvotes: 5

Related Questions