Hi Ben,

never mind, it works now after adapting my web.xml. Here is the relevant 
excerpt:

<filter-mapping>
 <filter-name>StripesFilter</filter-name>
 <url-pattern>*.jsp</url-pattern>
 <dispatcher>REQUEST</dispatcher>
</filter-mapping>
<!-- this is new -->
<filter-mapping>
 <filter-name>StripesFilter</filter-name>
 <url-pattern>*.htm</url-pattern>
 <dispatcher>FORWARD</dispatcher>
</filter-mapping>

<servlet-mapping>
 <servlet-name>StripesDispatcher</servlet-name>
 <url-pattern>*.htm</url-pattern>
</servlet-mapping>

I hope this help others as well. I'll add the clean urls to all parts of my 
application and come back when I encounter sth. strange

many thanks...

Kai

--- Original Nachricht ---
Absender: Kai Grabfelder
Datum: 17.06.2007 19:33
> Hi Ben,
> 
> here you go:
> 
> java.lang.IllegalStateException: A request made it through to some part of 
> Stripes without being wrapped in a
> StripesRequestWrapper. The StripesFilter is responsible for wrapping the 
> request, so it is likely that either the StripesFilter is
> not deployed, or that it's mappings do not include the DispatcherServlet 
> _and_ *.jsp. Stripes does not requiire that the Stripes
> wrapper is the only request wrapper, or the outermost; only that is is 
> present.
>       at 
> net.sourceforge.stripes.controller.StripesRequestWrapper.findStripesWrapper(StripesRequestWrapper.java:72)
>       at 
> net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder.bind(DefaultActionBeanPropertyBinder.java:263)
>       at 
> net.sourceforge.stripes.controller.DispatcherHelper$3.intercept(DispatcherHelper.java:190)
>       at 
> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:157)
>       at 
> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:111)
>       at 
> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:154)
>       at 
> net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:73)
>       at 
> net.sourceforge.stripes.controller.DispatcherHelper.doBindingAndValidation(DispatcherHelper.java:187)
>       at 
> net.sourceforge.stripes.controller.DispatcherServlet.doBindingAndValidation(DispatcherServlet.java:222)
>       at 
> net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:147)
>       at 
> net.sourceforge.stripes.controller.DispatcherServlet.doGet(DispatcherServlet.java:65)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>       at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>       at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
>       at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>       at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>       at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>       at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>       at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268)
>       at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
>       at 
> net.sourceforge.stripes.controller.StripesFilter.rewriteRequest(StripesFilter.java:319)
>       at 
> net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:200)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
>       at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>       at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>       at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>       at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>       at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>       at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
>       at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>       at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>       at org.mortbay.jetty.Server.handle(Server.java:285)
>       at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
>       at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
>       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
>       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
>       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
>       at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
>       at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> 
> 
> --- Original Nachricht ---
> Absender: Ben Gunter
> Datum: 17.06.2007 19:16
>> Hi, Kai. I didn't realize that IllegalStateException was coming from 
>> StripesRequestWrapper. Can you send the full stack trace for that exception?
>> 
>> Kai Grabfelder wrote:
>>> Hi,
>>>
>>> as written in my last post, the removed cast brings the next problem: the 
>>> IllegalStateException (StripesRequestWrapper.java:72) is
>>> thrown. I guess the forward is the problem. I guess if I would so such a 
>>> forward anywhere else in my application I would encounter
>>> the same problem. What are you mapping the dispatcher sevlet against?
>>>
>>> What do you mean with "response has been commited"?
>>>
>>> I would go for removing the internal forward, I think it brings less 
>>> problems with it. What speaks against this?
>>>
>>> cheers
>>>
>>> Kai
>>>
>>>
>>> --- Original Nachricht ---
>>> Absender: Ben Gunter
>>> Datum: 17.06.2007 18:19
>>>   
>>>> I removed that cast since it wasn't necessary, but I guess that just 
>>>> exposed a different problem for you. I've tested locally with a *.htm 
>>>> mapping using the same UrlBinding you gave, and it works with no problem 
>>>> for me.
>>>>
>>>> The way this thing works is the parameters that are embedded in the 
>>>> request URI are detected by StripesFilter, and the request is forwarded 
>>>> internally to the same URI with the embedded parameters appended as a 
>>>> query string. For example, given @UrlBinding("/foo/{id}/bar.html"), a 
>>>> request to /foo/123/bar.html would be rewritten and forwarded to 
>>>> /foo/123/bar.html?id=123.
>>>>
>>>> If the response has been committed before this forward is attempted, 
>>>> then an IllegalStateException is thrown. Is this possibly what is 
>>>> happening in your case?
>>>>
>>>> I've been mulling the idea of not using an internal forward at all and 
>>>> just adding to StripesRequestWrapper the ability to add new parameters 
>>>> that would appear as if they were present in the original request. 
>>>> Anybody have any thoughts on that?
>>>>
>>>> -Ben
>>>>
>>>> Kai Grabfelder wrote:
>>>>     
>>>>> hm, if I change the line, throwing the exception to HttpServletRequest 
>>>>> I'm getting an IllegalStateException by
>>>>> StripesRequestWrapper.java:72
>>>>>
>>>>> It this somehow related to my settings in web.xml?
>>>>>
>>>>> I currently do a mapping of *.htm to the StripesDispatcher and a mapping 
>>>>> of *.jsp to the StripesFilter...
>>>>>
>>>>> cheers
>>>>>
>>>>> Kai
>>>>>
>>>>>
>>>>> --- Original Nachricht ---
>>>>> Absender: Kai Grabfelder
>>>>> Datum: 17.06.2007 13:01
>>>>>   
>>>>>       
>>>>>> Hi Ben,
>>>>>>
>>>>>> I just tried the current trunk code and I'm getting a ClassCastException 
>>>>>> after calling an action bean with the following URL mapping:
>>>>>>
>>>>>> @UrlBinding(value = "/community/mitglieder/{id}/show.htm")
>>>>>>
>>>>>> The following url was generated by the link tag: 
>>>>>> /community/mitglieder/22/show.htm - now if I open this url in the 
>>>>>> browser the
>>>>>> following exception is thrown...
>>>>>>
>>>>>> java.lang.ClassCastException: org.mortbay.jetty.Request
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.AnnotatedClassActionResolver.getActionBean(AnnotatedClassActionResolver.java:245)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.DispatcherHelper$1.intercept(DispatcherHelper.java:102)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:157)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:111)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:154)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.integration.spring.SpringInterceptor.intercept(SpringInterceptor.java:64)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:154)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.security.controller.SecurityInterceptor.intercept(SecurityInterceptor.java:80)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:154)
>>>>>>  at 
>>>>>> de.kinokai.web.interceptor.AutoLoginInterceptor.intercept(AutoLoginInterceptor.java:92)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:154)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:73)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.DispatcherHelper.resolveActionBean(DispatcherHelper.java:98)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.DispatcherServlet.resolveActionBean(DispatcherServlet.java:206)
>>>>>>  at 
>>>>>> net.sourceforge.stripes.controller.DispatcherServlet.doPost(DispatcherServlet.java:140)
>>>>>> ...
>>>>>>
>>>>>> Any idea?
>>>>>>
>>>>>> cheers
>>>>>>
>>>>>> Kai
>>>>>>
>>>>>>
>>>>>> --- Original Nachricht ---
>>>>>> Absender: Ben Gunter (JIRA)
>>>>>> Datum: 13.06.2007 16:02
>>>>>>     
>>>>>>         
>>>>>>>     [ http://mc4j.org/jira/browse/STS-262?page=comments#action_10727 ] 
>>>>>>>             
>>>>>>> Ben Gunter commented on STS-262:
>>>>>>> --------------------------------
>>>>>>>
>>>>>>> I forgot to mention that parameters can take default values. If the 
>>>>>>> parameter is not present in the URI, then its default value will be 
>>>>>>> appended to the query string on forward. Here's an example.
>>>>>>>
>>>>>>> @UrlBinding("/action/map/{country=US}")
>>>>>>>
>>>>>>> So if the URI is /action/map/CA you'll get a map of Canada, but if it's 
>>>>>>> just /action/map then you'll get a map of the default country, in this 
>>>>>>> case US.
>>>>>>>
>>>>>>> Escaping is also supported with backslashes in case you want to embed 
>>>>>>> something weird:
>>>>>>>
>>>>>>> @UrlBinding("/action/this\\{is\\}weird")
>>>>>>>
>>>>>>>       
>>>>>>>           
>>>>>>>> Friendly URL support
>>>>>>>> --------------------
>>>>>>>>
>>>>>>>>                 Key: STS-262
>>>>>>>>                 URL: http://mc4j.org/jira/browse/STS-262
>>>>>>>>             Project: Stripes
>>>>>>>>          Issue Type: New Feature
>>>>>>>>          Components: ActionBean Dispatching
>>>>>>>>            Reporter: Tim Fennell
>>>>>>>>         Assigned To: Ben Gunter
>>>>>>>>             Fix For: Release 1.5
>>>>>>>>
>>>>>>>>         Attachments: cleanurls-patches.zip, cleanurls-src-01182007.zip
>>>>>>>>
>>>>>>>>
>>>>>>>> One thing that comes up frequently is support for friendly URLs, e.g.:
>>>>>>>>   /blog/2006/08/22
>>>>>>>>   /user/6282/edit
>>>>>>>> and so on.  While it's possible to acheive URLs like this using 3rd 
>>>>>>>> party tools like UrlRewriteFilter it would be nice if they were built 
>>>>>>>> directly into stripes because then all URL information could be kept 
>>>>>>>> in a single place for each class.
>>>>>>>> I'm envisaging an annotation something like this:
>>>>>>>>     @UrlInfo("/{year}/{month}/{day}")
>>>>>>>>     @UrlInfo("/{userId}/{event}")
>>>>>>>> that would inform Stripes how to map the extra pieces of information 
>>>>>>>> encoded in the URL.
>>>>>>>> Optionally this could also be specified with the existing UrlBinding 
>>>>>>>> annotations, e.g.
>>>>>>>>     @UrlBinding("/blog/{year}/{month}/{day}")
>>>>>>>> If done right, the stripes url and link tags could also take advantage 
>>>>>>>> of this information to put certain parameters into the URL instead of 
>>>>>>>> a parameter string.
>>>>>>>> I'm very open to hearing alternative ideas around how to specify this, 
>>>>>>>> and other functionality that would be desirable.
>>>>>>>>         
>>>>>>>>             
>>>>>> -------------------------------------------------------------------------
>>>>>> This SF.net email is sponsored by DB2 Express
>>>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>>>> control of your XML. No limits. Just data. Click to get it now.
>>>>>> http://sourceforge.net/powerbar/db2/
>>>>>> _______________________________________________
>>>>>> Stripes-development mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-development
>>>>>>
>>>>>>     
>>>>>>         
>>>>> -------------------------------------------------------------------------
>>>>> This SF.net email is sponsored by DB2 Express
>>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>>> control of your XML. No limits. Just data. Click to get it now.
>>>>> http://sourceforge.net/powerbar/db2/
>>>>> _______________________________________________
>>>>> Stripes-development mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/stripes-development
>>>>>   
>>>>>       
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.net email is sponsored by DB2 Express
>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>> control of your XML. No limits. Just data. Click to get it now.
>>>> http://sourceforge.net/powerbar/db2/
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Stripes-development mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/stripes-development
>>>>     
>>>
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> Stripes-development mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/stripes-development
>>>   
>> 
>> 
>> 
>> ------------------------------------------------------------------------
>> 
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> 
>> 
>> ------------------------------------------------------------------------
>> 
>> _______________________________________________
>> Stripes-development mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/stripes-development
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Stripes-development mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/stripes-development
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to