defining a ServletContext
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   A_D
Posted On:   Monday, May 21, 2007 07:24 PM


Hi, How can I create a ServletContext within a web application so I can load by looking up for the name I defined previously?

For example in the application I create a ServletContext of name "test" and if I call the getContext(String uri) method it return me "test" like this:

ServletContext sc = getServletContext();
System.out.println(sc.getContext("/test");

Output:
test

About | Sitemap | Contact