I'll research this.

- Dmitri

----- Original Message ----- 
From: "Thyr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 22, 2004 12:49 PM
Subject: [JXPath] JXPathServletContexts scope problem


> 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]
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to