commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitri Plotnikov" <dmi...@apache.org>
Subject Re: [JXPath] JXPathServletContexts scope problem
Date Sat, 08 May 2004 19:47:58 GMT
Thyr, 

The problem is now fixed (it was kind of messy)

Thank you very much for reporting it.

- Dmitri

----- Original Message ----- 
From: "Dmitri Plotnikov" <dmitri@apache.org>
To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
Sent: Monday, March 22, 2004 9:40 PM
Subject: Re: [JXPath] JXPathServletContexts scope problem


> I'll research this.
> 
> - Dmitri
> 
> ----- Original Message ----- 
> From: "Thyr" <Thyr666@compuserve.de>
> To: <commons-user@jakarta.apache.org>
> 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: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > 
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message