This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Can I access a jsp page which is in WEB-INF folder?

 
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody, I am chaitanya, I have a doubt, Using the deployment descriptor, I can access the classes in the classes folder under WEB-INF.

Consider a scenario, I have a folder named jsps under WEB-INF folder, not can I access the jsps. If I can do so, please tell me how to do that, should I configure anything in the deployment descriptor.

Please help me. Thank you all in advance.
 
Marshal
Posts: 67366
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The whole purpose of putting JSPs under WEB-INF is to disallow directly addressing them. This is a good practice as the JSPs should only be available via their servlet controllers -- you can forward to JSPs under WEB-INF.

If that's not what you want, don't put them there.
 
chaitanya karthikk
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bear, but how can I do that. Can you please give me an example or any reference.

Thank you in advance.
 
Bear Bibeault
Marshal
Posts: 67366
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need information on how not to put a file in a folder?

If you want to access a JSP directly (should be rare), don't put it in WEB-INF.
 
chaitanya karthikk
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:You need information on how not to put a file in a folder?

If you want to access a JSP directly (should be rare), don't put it in WEB-INF.



Thanks Bear, I want the information on how to access a webpage present in WEB-INF folder.

Thank you in advance.
 
Bear Bibeault
Marshal
Posts: 67366
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forward to the JSP from its page controller.
 
chaitanya karthikk
Ranch Hand
Posts: 806
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Forward to the JSP from its page controller.



Thank you Bear, I will definitely try that one.
 
I once met a man from Nantucket. He had a tiny ad
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!