I noticed a common pattern is to put JSP pages in WEB-INF folder (as opposed to WAR root). What’s the difference? Why is that preferred?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Files in
WEB-INFare not visible to the users. It’s a bit safer that way.If (a contrived example) you are including
db.jsp, but by itself it throws an exception, a malicious user can openhttp://yoursite.com/db.jspand get some insight on your application (worst – the database credentials) from the exception message.