Tomcat newbie: Trying to set up my own folder - get 'Resource not available'

S

Sam

Just installed Tomcat 5.0.16. I can run the samples and get to the
page

http://localhost:8080/jsp-examples/index.html

I want to make my own folder to work in call mySample. I have created
folder at c:\jakarta-tomcat-5.0.16\webapps\mySample which is the same
place jsp-examples is at. I have put an simple index.html in that
folder (no java code in it). If I type:

http://localhost:8080/mySample/index.html
or
http://localhost:8080/mySample

I get: 'The requested resource (/mySample/) is not available.'

I see no config entries for jsp-examples so I don't see why my folder
is not available.

Thanks in advance

Sam
 
W

Wendy S

Sam said:
I get: 'The requested resource (/mySample/) is not available.'
I see no config entries for jsp-examples so I don't see why my folder
is not available.

Did you restart Tomcat? AFAIK, it "sees" when you drop a new .war file in,
but I've never seen it autodetect the creation of a directory under webapps.
You're correct that you don't need a config file for it to see your
index.html, but I'm betting it needs a restart to find the new directory.
 
E

Eki Y. Baskoro

G'Day Sam,

You need to add a Context to server.xml located at $CATALINA_HOME/conf
directory. Scroll down to nearly end of the file and insert the following
among its sibling:

<Context path="/mySample" docBase="mySample" debug="0" reloadable="true"
crossContext="true">
</Context>

and then restart your Tomcat engine.
 
S

Sam

Eki Y. Baskoro said:
G'Day Sam,

You need to add a Context to server.xml located at $CATALINA_HOME/conf
directory. Scroll down to nearly end of the file and insert the following
among its sibling:

<Context path="/mySample" docBase="mySample" debug="0" reloadable="true"
crossContext="true">
</Context>

and then restart your Tomcat engine.

Thanks. Finally got it all working...
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top