OK,
I have webapps/mydir/ and webapps/ROOT/WEB-INF/ which contains web.xml. Can I not define a 'global' WEB-INF? ie something like:
webapps/WEB-INF that applies to all applications? Thus all my apps may be accesible such as webapps/mydir1/, webapps/mydir2/ etc?

"so add one for yourself in server.xml"

I cannot see any reference to server.xml. Must it be defined? What is the syntax please?

thanks again

Newbie bloke!




Generally the structure is like this (for a webapp) :
$WEB_APPDIR/WEB-INF/
And we pack everything into a war file. So for deployment I generally stuff the war file into the webapps directory. Upon restart or stop & start, the app will be delopyed with a directory name from the war file name. A context will be added and can be accessed by http://localhost:8080/[WEBAPPNAME] . Since you manually created the directory, no context is added, so add one for yourself in server.xml .

Enok Strine wrote:


I see. So the directories you talk of are not yet present, presumably I create them at my leisure?
What about ROOT? Why when I create webapps/mydir/myfile.jsp and load it into the browser is it not accessible? (404)

Must I define a WEB-INF for each app under webapps? What must it contain?
I'm not sure if you *need* to create a web-inf for each webapp. You can try and see if it complains about it. In the last email I did explain what the WEB-INF could contain. If you need examples of .war files, you can go to the taglib projects in jakarta, plenty of sample to choose from.

Thank you

E.


yes, each webapp has its own web.xml, you can use that among other things to define your servlets, taglibs, resource-refs.
unjared classes go into /WEB-INF/classes directory, jars go into /WEB-INF/lib
How long a web.xml can be depends on how many things you wish to put in there. I think the tomcat doc has a section on best practices deployment. It *should* come with your installation of tomcat.

Enok Strine wrote:

Hi folks,
I have installed TC 4.1 and have it apprently installed correctly. Can anyone tell me the significance of the WEB-INF dir please?
Also, must everything run under webapps/root/..? I am presuming WEB-INF holds configuration / class libraries for each app? Yet there is a single web.xml, file 6 lines in length?
Will someone please enlighten me?

E.

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to