• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getResource / getResourceAsStream / WEB-INF

 
Olivier Cleyman
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some gap in my understanding of the getResource / getResourceAsStream.

I know that we have access to thoses methods from the classloader and from the ServletContext.

I wanted to know if some one as a clear view on what we need to know about theses 4 methods for the certification.

I also have some interogation about the accessibility of resources under the WEB-INF directory.

I know that a user cannot access directly that kind of resource, but that we can give acc�s via the apllication. The thing is I do not practice this.
Is this access mechanism tranparent for us?? I don't think so.
For example I cannot forward in a sevlet to a JSP under the WEB-INF via the normal way:

req.getRequestDispatcher(/WEB-INF/ajsp.jsp").forwar(req,resp);


Can somebody help me with that?


Thanks a lot,
Olivier
 
Olivier Cleyman
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK just forget about the second question on WEB-INF, I know what went wrong:
I was forwarding to a static html page like this
req.getRequestDispatcher(/WEB-INF/ajsp.html").forward(req,resp);
which is, obviously, stupid

Still looking for question 1 infos


Thx

[ June 09, 2005: Message edited by: Olivier Cleyman ]

[ June 09, 2005: Message edited by: Olivier Cleyman ]
[ June 09, 2005: Message edited by: Olivier Cleyman ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic