Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Tomcat Running Java Servlets from development Directory

  • 07-04-2007 3:21am
    #1
    Registered Users, Registered Users 2 Posts: 1,559 ✭✭✭


    Ok Im using Tomcat.
    I made a directory for to store my servlets in c which is c:/Servlets+JSP.

    How do I run the servlets stored in this directory?

    I know how to run the servlets I put in the root directory
    http://localhost:8080/servlet/theservletname.

    So what do I have to change in order to run the servlets in the
    c:/Servlets+JSP directory?


Comments

  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Create your servlet WAR file then go to this address (if you default installed).

    http://localhost:8080/manager/html/list

    go to "WAR file to deploy" and put in the location of your war file and it will be deployed to the server.

    If you mean physically move the directory. No idea sorry.


  • Registered Users, Registered Users 2 Posts: 1,127 ✭✭✭smcelhinney


    You can also change the Context parameter in your server xml to point to that docbase (or appbase)

    This is a good article (although its specific to Tomcat 4.1, the same methodology applies)

    http://www.onjava.com/pub/a/onjava/2002/07/31/tomcat.html

    Be careful using the + sign though, if it appears in a server xml param it might try to treat it as a variable concatenation. Better off a) changing it, or b) encoding it.


Advertisement