I was reading a book (school book) on jsp and there was something I couldn't understand. In the book we had to execute a jsp page and for that they set a context in servlet.xml in tomcat 5.5:
<Context path="JSPTEST" docBase = "G:\Tomcat5.5"\webapps\JSPTEST"></Context>
and the jsp in that folder is accessed at http://localhost:8080/JSPTEST/filename.jsp
The first thing I realized is that the docBase is actually a webapp on the server so with or without setting this context it will still run on the same url
so what's the point?
I installed a tomcat 7 and added a context to conf/context.xml
Context docBase="F:\work\bscit\serverside\practical" path="serverside" reloadable="true" />
I put hello.jsp under the practical
folder restarted the tomcat and there was no response.server was down with this in catalina_log. To me that's another way to set a virtualhost (I have a good idea on how to create a virtualhost under apache httpd) so am kind of confused right now.
Question 1 what exactly context are used for ? I've had a look at tomcat doc it didn't ring the bell
Question 2 how can I make the "same" thing work on tomcat 7 (without putting the file in tomcat of course)?