Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

making use of servlet through WEB-INF  RSS feed

 
Amit jain Mait
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..

 
Vijitha Kumara
Saloon Keeper
Posts: 3997
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Amit jain Mait
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
Vijitha Kumara
Saloon Keeper
Posts: 3997
42
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!