Hello,
I have a problem using Servlet Contexts and .getRequestContext.
JXPathServletContexts.getRequestContext() does not walk through the
different contexts to get a specific object as promised in the
documentation.
What's wrong?
Example (last line):
public class test extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse
response)
throws IOException, ServletException {
PrintWriter out = response.getWriter();
ServletContext servletContext = getServletContext();
servletContext.setAttribute("A", "anObject");
JXPathContext appContext =
JXPathServletContexts.getApplicationContext(getServletContext());
JXPathContext reqContext =
JXPathServletContexts.getRequestContext(request, getServletContext());
out.println("this works: "+ appContext.getValue("A"));
out.println("this does not work: "+reqContext.getValue("A"));
}
}
Thanks in advance!
Reidar H.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]