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..


ie /tomcat/webapps/examples/WEB-INF/classes/cal


i can access all the files present in classes but not in it's sub directories.


and i have one more problem, i have to give the following in URL in order to execute a servlet


http://localhost:8888/examples/servlet/CookieExample


and this does not work if i don't give servlet in the URL.


it would be of great help if someone could give me the details of how to access subfolder or about the context path settings.


thanking u in advance

Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • problem with accessing servlets in subfolders
    2003-11-23 11:51:13  anonymous2 [View]

    Take a look at my comment...it seems I am not the only one with problems. You have to reference the servlet with

    "/web-app-dir/servlet/servletname"

    rather than "/servlet/servletname"

    Otherwise Tomcat won't look in your /classes subfolder.

    -Chris (coldfusion78_AT_yahoo.com)
  • 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.