The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes web application inside web application ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "web application inside web application ??" Watch "web application inside web application ??" New topic
Author

web application inside web application ??

R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5369
Hi
can we have web app inside webapp?
I mean in Tomcat inside webapps we have directory "app01" now we have another dir inside app01, let us say "app02".
Now dir tree is like

can I have WEB-INF directory in app02 and servlet there, say to call like
localhost:8080\app01\app02\servlet\MyServlet
I tried it but I am not able to run the servlet in side app02.
I set context in server.xml to app01.
I am able to access .jsp/.html pages directly(localhost:8080\app01\app02\MyJsp.jsp)
But when I call servlet(localhost:8080\app01\app02\servlet\MyServlet) then it fails. It shows 404 error.
anyone else has tried this ...
any remeady for this ??
TIA


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
Ravish.
No. This will never work (unless they change the specs considerably).
You must put servlets in ONE special directory under ONE webapp, which is called WEB-INF. There you put the classes in directories which mirrors the package structure of your servlet classes.
(mockexam.data.Controller.class goes in myApp\WEB-INF\mockexam\data\Controller.class).
Anyway. What would that be good for. Your nested apps?
 
 
subject: web application inside web application ??
 
Threads others viewed
500 internal server error
not able to deploy application
problem with first servlet
Not Found Error
500 internal server error
IntelliJ Java IDE