| Article: |
Deploying Web Applications to Tomcat | |
| Subject: | problem with accessing servlets in subfolders | |
| Date: | 2003-05-25 21:06:41 | |
| From: | anonymous2 | |
|
hi, i am not able to access servlet classes within the sub folders..
|
||
Showing messages 1 through 5 of 5.
-
problem with accessing servlets in subfolders
2003-11-23 11:51:13 anonymous2 [View]
-
how to set a path in servlets
2008-06-04 19:40:34 vineela1289 [View]
please tell me how to set a path . -
problem with accessing servlets in subfolders
2005-03-04 23:34:27 BajuRam [View]
hi Chris,
thanx for your response.
I did the things you have suggested, but its not working. The server is'nt responding for the classes present in the subfolders of the default directory for classes.
The default URL for Tomcat would be like this http://localhost:8080/examples/servlet/home for the home.class file present in c:\Program Files\Apache Tomcat 4.0\webapps\examples\web-inf\classes\. I want to access the classfile present in c:\Program Files\Apache Tomcat 4.0\webapps\examples\web-inf\classes\home\a\a1\a11 through the URL http://localhost:8080/examples/servlet/home/a/a1/a11.
Thank u Chris for all the concern.
bye n take care.
-
problem with accessing servlets in subfolders
2003-05-26 02:33:42 anonymous2 [View]
Do you have your directory structure under classes declared as a package in your java class?
In your example, you should have the classes under cal being devlared as a package called cal.
I hope this helps. Good luck. -
problem with accessing servlets in subfolders
2003-05-26 03:38:32 anonymous2 [View]
hi,
thank u for the reply.
yes, the package is declared in the java program. even then i am not able to run the built in examples of tomcat and in all the examples, packages has been declared.
is there anything to do with web.xml where u have to add <servlet-mapping>.
thanking u
santy (santosh_b_p@yahoo.com)



"/web-app-dir/servlet/servletname"
rather than "/servlet/servletname"
Otherwise Tomcat won't look in your /classes subfolder.
-Chris (coldfusion78_AT_yahoo.com)