I'm not sure what a web instance is. Do you mean a web application??
If so then in Tomcat's webapps/ directory, create a new directory which be your web application. Under this app directory you also need a /WEB-INF/web.xml. Just use a copy of web.xml file from another web application.
Hi !!
You have to create a subdir of webapps.
In that subdir you must create a new subdir called WEB-INF in which you put a web.xml file (you can copy it giving a look from the one that is in other contexts like examples) and 2 dubdirs: lib and classes. In lib you will put your .jar files, in classes all your classes that are unpackaged.
What if you want this tomcat to contain one-and-only-one web appllication. If you want that application to be right under webapps directory can you simply have
webapps/index.jsp
webaps/WEB-INF folder
Can you put your web application classes (compiled servlets and other classes) in the TOMCATHOME lib directory?
Can anyone tell me if and why this is a BAD organization?
You don't want to put content in the webapps/ directory. I looked at my setup using 4.1.12 and I can't see any reason why you couldn't just put your application in /ROOT web application. Then your application would show up as
For my application using the default Tomcat distribution, I got rid of all the directories under webapps/ except ROOT/ and myApp/
( Note: you need to change the conf/server.xml to get rid of references to the examples/ application; or rename server-noexamples.xml.config file to server.xml )
-------------
<%
response.sendRedirect( "myApp/index.html" );
%>
--------------
This tells the browser to redirect to my application. For my setup, user then sees
Putting the application in /ROOT would get rid of the myApp subdirectory. I don't know if there would be a problem with putting your application as ROOT. I can't see reason why it would be problem.
You could always try it and see what happens. Let me know how it goes.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.