I'm not sure if you could write a special tag to do this specific task, if
that's what you're asking. However, you can get rid of the scriptlet, and
the tag that's using it in your example. Instead, write the corresponding
parameter like this:
<c:param name='org.apache.struts.taglib.html.TOKEN'
value='${sessionScope["org.apache.struts.action.TOKEN"]}' />
Perhaps not ideal, but somewhat cleaner and simpler.
--
Martin Cooper
----- Original Message -----
From: "Glenn Kronschnabl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 01, 2002 6:22 PM
Subject: <c:url> cooperation with struts transaction token - better than
brute force?
> Hi,
>
> I'm a struts user and I use the transaction token that you can use on
> forms/urls. However, I prefer the <c:url> syntax over <html:link>
> (especially for multiple request params). The way I'm simulating the
> <html:link transaction="true"> right now is to do something like:
>
> <jr:set var="token" value='<%=
> session.getAttribute("org.apache.struts.action.TOKEN") %>' />
>
> <c:url var="editUrl" value="/main/service_edit/pre.do">
> <c:param name="org.apache.struts.taglib.html.TOKEN" value="${token}" />
> <c:param name="rateData.orderType" value="${rate.orderType}"/>
> <c:param name="accountNum" value="${acm.accountId}"/>
> </c:url>
> <a href='<c:out value="${editUrl}"/>' >Change</a>
>
> but I was wondering if there is an easier way? Could I somehow use
> cooperating tags and come up with something like <c:param> but for the
> transaction token specific?
>
> Thanks,
> Glenn
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>