My reading of the servlet spec shows that, using 
getAttribute('javax.servlet.include.servlet_path')-which is the only method 
used by net.sourceforge.stripes.tag.layout.LayoutDefinitionTag.doStart() -will 
work only if the include was used. since you should be 
able to forward to the jsp page before that page invokes the layout-definition 
using include, the above method will have a wrong value since the parameter 
will not be there. at this point, it will be under 
getAttribute("javax.servlet.forward.servlet_path"); I therefore think stripes 
should consider this as well since the relegation of the control to the jsp can 
come from anywhere.

I dont know how to fix this though

From: [EMAIL PROTECTED]
To: [email protected]
Date: Wed, 2 Jul 2008 19:19:18 +0100
Subject: Re: [Stripes-users] Forwarding to a jsp that uses stripes      taglib  
from a  filter








a short section of my web.xml. the urlRewriter creates the name of the jsp file 
requested and forwards to it. Stripes intercepts the forward to do 
instantiation before jsp is written

  <filter-mapping>    
   <filter-name>UrlRewriteFilter</filter-name>
   <url-pattern>/*</url-pattern>
  </filter-mapping>
  
  <filter-mapping>
    <filter-name>StripesFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>
  
  <filter-mapping>
    <filter-name>StripesFilter</filter-name>
    <servlet-name>StripesDispatcher</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>

From: [EMAIL PROTECTED]
Date: Wed, 2 Jul 2008 13:48:02 -0400
To: [email protected]
Subject: Re: [Stripes-users] Forwarding to a jsp that uses stripes taglib       
from a  filter


Do you have the URLRewrite filter mapped only to the REQUEST dispatcher, or 
does it also kick in on INCLUDEs?  It sounds to me like the Stripes code is 
expected to only ever be called through an include, and in this case is not 
because something is intercepting in the middle and doing something else.  Is 
that the case?  And if so, is there any need to have the URLRewrite work on 
anything except requests coming in from outside the container?
-t
On Jul 2, 2008, at 1:41 PM, Farouk Alhassan wrote: Hi guys, can someone help me 
here as i am stack.. a further debugging shows that  is definetily null. This 
may also be due to the fact the there is 
confusion on the value returned by the

String name = (String) getPageContext().getRequest() 
.getAttribute('javax.servlet.include.servlet_path'); depending on whether its a 
include or a forward

http://www.caucho.com/resin-3.0/webapp/faq.xtp

From: [EMAIL PROTECTED]
To: [email protected]
Date: Wed, 2 Jul 2008 08:07:03 +0100
Subject: [Stripes-users] Forwarding to a jsp that uses stripes taglib from a    
filter

 I have an intercepting filter that rewrites a url and forwards to the url 
(URLrewriter http://tuckey.org/urlrewrite/ )
 wrk lik
/contact will be retwritten as /contacts.jsp and forwarded to the jsp. However 
the jsp throws a very nice NPE. dont know. a little dig into the stripes
code reveals the execption on this line

        // Assuming that the layout definition page is always included, the 
following line gets
        // the name of the page the tag is sitting on, as per Servlet 2.4 spec, 
page 65.
        String name = (String) getPageContext().getRequest()
                .getAttribute('javax.servlet.include.servlet_path');

what can i do, to get round it. I have attached the stack trace

> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> _______________________________________________
> Stripes-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-users

 Get Started!  
Get Hotmail on your Mobile!  Try it 
Now!-------------------------------------------------------------------------Sponsored
 by: SourceForge.net Community Choice Awards: VOTE NOW!Studies have shown that 
voting for your favorite open source project,along with a healthy diet, reduces 
your potential for chronic lamenessand boredom. Vote Now at 
http://www.sourceforge.net/community/cca08_______________________________________________Stripes-users
 mailing [EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/stripes-users 

Find out how to make Messenger your very own TV! Try it Now!

_________________________________________________________________
The John Lewis Clearance - save up to 50% with FREE delivery
http://clk.atdmt.com/UKM/go/101719966/direct/01/
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to