If i put a jsp file into web-inf and then try to call it from servlet,it is happening.But,if i am putting a html page into web-inf and if i am trying to call that from servlet,it is saying requested resource is not available.Any suggestions?
yes Bear,I meant forwarding only. Actually,from servlet i am able to forward to html page and jsp page both. Earlier,i was going from servlet to jsp through request dispatcher,then from jsp to other html on button clicking,so control was not going to that html page. So,i have reached to a conclusion : If we are going to other page(html or page) through button click,link click etc.,then other resource must be outside web-inf even if first resource is also inside web-inf. Explanation: IF, web-inf/a.jsp--->web-inf/b.jsp, on button click we can't go to b.jsp,it has to be outside web-inf,if we want to access on button click. Please tell me if i am accurate in my decision.
First, whenever I see this I point it out because I've seen people get hung up on it. The directory WEB-INF must always be spelled with upper case letters. A directory named 'web-inf' has no special meaning in Java web application. This happens enough that it is the textbook example used in: http://faq.javaranch.com/java/AvoidRedHerrings
If you're saying here, that a.jsp is being allowed direct access to a browser (and the directory is really named "WEB-INF") I would tell you that you are wrong.
Nothing under WEB-INF is directly available to the web.