cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: How to match jsessionid?
Date Mon, 22 Jul 2002 16:49:27 GMT
> From: Johannes Koch [mailto:koch@pixelpark.com] 
> Piroumian Konstantin wrote:
> >>From: Johannes Koch [mailto:koch@pixelpark.com] 
> >>Piroumian Konstantin wrote:
> >>
> >>>>From: Johannes Koch [mailto:koch@pixelpark.com] 
> >>>>
> >>>>Hi,
> >>>>
> >>>>I have URLs like this:
> >>>>'foo.do;jsessionid=abcdefg?bar=blah'
> >>>>
> >>>>When I try to match it with the wildcard matcher
> >>>><map:match pattern="foo*">
> >>>>  ...
> >>>></map:match>
> >>>>{1} is only '.do'. How can I match the jsessionid part?
> >>>
> >>>
> >>>Try this: <map:match pattern="foo.*;jsessionid=*"> and use {2}.
> >>
> >>I already tried this. But, unfortunately, the URL is not 
> >>matched by this 
> >>pattern. :-(
> > 
> > 
> > Ah! It should be that servlet container simply strips out 
> the session Id and
> > provides a clear URL. In this case you should use an action 
> to get the
> > session Id from request and use a matcher like: "foo.*".
> 
> How is this done?

Take a look at other Session* actions in org.apache.cocoon.acting.* package.
You should do something like this in your act() method:

Map map = new HashMap(1);
map.put("jsessionid",
ObjectModelHelper.getRequest(objectModel).getSession().getId());
return map;

Konstantin

> -- 
> Johannes Koch  . IT Developer
> Pixelpark AG   . http://www.pixelpark.com
> Rotherstra├če 8 . 10245 Berlin  .  Germany
> phone: +49 30 5058 - 1288  .  fax: - 1355
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message