LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   reference to a folder I can't find (apache tomcat) (https://www.linuxquestions.org/questions/linux-newbie-8/reference-to-a-folder-i-cant-find-apache-tomcat-4175525111/)

Reprovo 11-11-2014 03:02 PM

reference to a folder I can't find (apache tomcat)
 
hi.
Not sure If this Is the right forum to post this but I'm a bit confused about some tomcat servlet examples I Installed.

The examples are In /usr/share/tomcat7-examples/examples/servlets.

There's an index.html and other html servlet files In the servlets directory.What I don't understand Is the href that executes the servlet In Index.html points to /servlet/someservlet.

Where Is this servlet directory ? from my little knowledge , I would expect It to be inside the servlets directory but It's not.

Any help would be appreciated.:confused:

dijetlo 11-12-2014 05:33 AM

A tutorial on deploying servlets

Quote:

By default, a servlet application is located at the path <Tomcat-installation-directory>/webapps/ROOT and the class file would reside in <Tomcat-installation-directory>/webapps/ROOT/WEB-INF/classes.

If you have a fully qualified class name of com.myorg.MyServlet, then this servlet class must be located in WEB-INF/classes/com/myorg/MyServlet.class.

Reprovo 11-12-2014 09:04 AM

Thanks! I found the class files In the /usr/share/tomcat7-examples/examples/WEB-INF directory.
I still don't get how servlet/someservlet maps to the WEB-INF classes directory.What Is servlet , a symlink ? Is there any way I can see what servlet Is ?

Reprovo 11-12-2014 01:23 PM

After a little googling , this article about the InvokerServlet clears things up.

http://www.avajava.com/tutorials/les...t-mapping.html


All times are GMT -5. The time now is 10:15 AM.