You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Philippe Guillard <pg...@soociety.com> on 2004/06/22 17:43:05 UTC

get-sitemap-parameter in JSP ?

Is there a way to get a sitemap parameter from a JSP page(JSP block),
equivalent of the XSP <util:get-sitemap-parameter name="xxx"/> with
xmlns:util="http://apache.org/xsp/util/2.0" ?

Regards,

Phil


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


Re: get-sitemap-parameter in JSP ?

Posted by Joerg Heinicke <jo...@gmx.de>.
On 26.06.2004 15:00, Philippe Guillard wrote:

> Thanks a lot!
> 
> In my case is use JSP in portal (cachingURI coplet), links like 
> <a href="page2?a=1">page2</a> is transformed in action=x&event=y,
> 
> so the query-string is:
> a=1?copletid=app-test-1&cocoon-portal-action=1&cocoon-portal-event=21
> 
> and if i rely on the servlet from JSP:
> - ParamUtil.getParameterInt(request, "cocoon-portal-action") is ok  
> - ParamUtil.getParameterInt(request, "a) gives a java exception
> 
> BUT STRANGE ! in sitemap or in XSP using
> <xsp:expr>request.getParameter("a")</xsp:expr> i get the right
> request-param.
> 
> So new question : is there a way to get the original request params from
> the servlet ?

You *have* the original request object in JSP and so you can access the 
original request params. And I wonder if one ("cocoon-portal-action") 
works why the other one ("a") shall not work! I guess it is not the 
missing quote in the above as otherwise the code would not even compile.

Joerg

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


Re: get-sitemap-parameter in JSP ?

Posted by Philippe Guillard <pg...@soociety.com>.
Thanks a lot!

In my case is use JSP in portal (cachingURI coplet), links like 
<a href="page2?a=1">page2</a> is transformed in action=x&event=y,

so the query-string is:
a=1?copletid=app-test-1&cocoon-portal-action=1&cocoon-portal-event=21

and if i rely on the servlet from JSP:
- ParamUtil.getParameterInt(request, "cocoon-portal-action") is ok  
- ParamUtil.getParameterInt(request, "a) gives a java exception

BUT STRANGE ! in sitemap or in XSP using
<xsp:expr>request.getParameter("a")</xsp:expr> i get the right
request-param.

So new question : is there a way to get the original request params from
the servlet ?

Regards,

Phil




On Sat, 2004-06-26 at 19:22, Joerg Heinicke wrote:
> On 22.06.2004 17:43, Philippe Guillard wrote:
> 
> > Is there a way to get a sitemap parameter from a JSP page(JSP block),
> > equivalent of the XSP <util:get-sitemap-parameter name="xxx"/> with
> > xmlns:util="http://apache.org/xsp/util/2.0" ?
> 
> I guess not as JSP is to loosely coupled. You probably can only rely on 
> the servlet API objects like request.
> 
> Joerg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Re: get-sitemap-parameter in JSP ?

Posted by Joerg Heinicke <jo...@gmx.de>.
On 22.06.2004 17:43, Philippe Guillard wrote:

> Is there a way to get a sitemap parameter from a JSP page(JSP block),
> equivalent of the XSP <util:get-sitemap-parameter name="xxx"/> with
> xmlns:util="http://apache.org/xsp/util/2.0" ?

I guess not as JSP is to loosely coupled. You probably can only rely on 
the servlet API objects like request.

Joerg

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