Forums Register Login

making use of servlet through WEB-INF

+Pie Number of slices to send: Send
how can i use the servlet file stored inside the WEB-INF folder of the project anywhere like in redirecting to that servlet or used by jsp etc..

+Pie Number of slices to send: Send
 

Amit jain Mait wrote:how can i use the servlet file stored inside the WEB-INF folder of the project anywhere like in redirecting to that servlet or used by jsp etc..


First, you can't access anything inside WEB-INF directly from outside(i.e: from a browser by typing the exact path to that resource). With servlets you define mappings between URLs & servlet classes in the web.xml. Then other resources like Servlets, JSPs etc.. in the application can send requests to that servlet or can be accessed by that mapped URL from outside if no security constraints are applied.
+Pie Number of slices to send: Send
i do about the policies described for WEB-INF.
actually my question was how can i access that servlet(inside in WEB-INF) through any servlet or jsp not through browser.
asking for that servlet through URL mapping of it in web.xml is not working..
+Pie Number of slices to send: Send
 

Amit jain Mait wrote:asking for that servlet through URL mapping of it in web.xml is not working..


Can you show us how you did it?
+Pie Number of slices to send: Send
What do you mean "access the servlet" and how are you trying to do it? Do you want to make an actual network request to it, or just use part of its implemenation?

And why are you doing trying to do this?
A magnificient life is loaded with tough challenges. En garde tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1195 times.
Similar Threads
why ???
RequestDispatch visiting jsp should be fine
servlet in both WEB-INF/lib and WEB-INF/classes
Lost properties
New to servlets&JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:31:11.