Deploying Servlets in virtual host / virtual filesystem environment

W

while_1

I'm an experienced tomcat-servlet programmer, but
only in an environment where I have root access to
the local server, where war files are copied to
$JAKARTA_HOME/webapps and then started individually
with the system's manager servlet.

I want to deploy some of my own work (from that environment)
on a shared host virtual filesystem setup--on a
small-scale commercial hosting machine. There the setup is
different and the local host provider doesn't
seem to know much about tomcat.

There is a WEB-INF directory inside the virtual document root.
But deploying a typical web.xml file there and trying
to reference it with http://that_domain:8080/myservlet
doesn't work.

I've spent several hours trying to find tomcat virtual
host information with Google, but got no where fast.

Is there a standard virtual-domain, virtual-filesystem
way of setting up and deploying tomcat servlets?
Does anyone know of a url to useful documentation?
 
B

Bryce

I'm an experienced tomcat-servlet programmer, but
only in an environment where I have root access to
the local server, where war files are copied to
$JAKARTA_HOME/webapps and then started individually
with the system's manager servlet.

I want to deploy some of my own work (from that environment)
on a shared host virtual filesystem setup--on a
small-scale commercial hosting machine. There the setup is
different and the local host provider doesn't
seem to know much about tomcat.

Find another hosting provider...

You can also include an xml file that goes into the webapps root
directory. It looks like this:

<context path="url path" docBase="path to web app's root">
// stuff in here
There is a WEB-INF directory inside the virtual document root.
But deploying a typical web.xml file there and trying
to reference it with http://that_domain:8080/myservlet
doesn't work.

This is different. What version of Tomcat?

And "doesn't work" is kind of vague. What's the error?

Does the context "myservlet" point to your virtual document root? How
are you defining your servlet in the web.xml file?
I've spent several hours trying to find tomcat virtual
host information with Google, but got no where fast.

Is there a standard virtual-domain, virtual-filesystem
way of setting up and deploying tomcat servlets?
Does anyone know of a url to useful documentation?

standard way is to define contexts either the way I described above or
in the <tomcat_home>/conf/server.xml. By default, Tomcat looks in its
webapps directory. Each folder or war file represents a seperate web
application.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top