That will work, but it has a built-in weakness. It side-steps the struts
action mappings by hard-coding the destination URL in the JSP.

The approach that I was using last night (which James helped me solve this
morning) was to go this way:

<bean:define id="myBeanName">
    <c:out value="${myXMLValue}/>
</bean:define>
<html:link forward="MyActionForwardName" paramId="myParamName"
paramName="myBeanName"/>


That constructs the proper link reference:
http://localhost/MyAppName/MyActionForward.do?myParamName=myXMLValue

And it still works if I change the declaration of MyActionForwardName in
struts-config.xml

Jefficus

----- Original Message -----
From: "Mike Deegan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 30, 2003 10:39 AM
Subject: Re: It's late and I'm feeling stupid


> Yes Jeff / David this works for me ....
>
> David> Try using "<c:url>" and "<c:param>" to build up a url with
> parameters, then
> David> reference the "${url}" variable from the "href" attribute of
> "<html:link>".
>
>  <c:url value="userPg" var="url">
>      <c:param name="ID" value="${item['id']}"/>
>      <c:param name="Dispatch" value="Zoom"/>
>  </c:url>
>
>  <a href='<c:out value="${url}"/>'>[Zoom...]</a>
>
> ending up with the following displayed in the JSP
>  [Zoom...]
>
> with the following link / URL properties
> http://localhost/do/userPg?ID=22&Dispatch=Zoom
> will open in the same window
>
> HTH
> Mike
>
> ----- Original Message -----
> From: "David M. Karr" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, March 30, 2003 10:34 AM
> Subject: Re: It's late and I'm feeling stupid
>
>
> > >>>>> "Jeff" == Jeff Smith <[EMAIL PROTECTED]> writes:
> >
> >     Jeff> I have some data in an XML file.
> >     Jeff> I read it in from JSP using <x:set> (the JSTL X tags)
> >
> >     Jeff> I then transfered it to a variable like so:
> >     Jeff> <c:set var="somevarname">
> >     Jeff>     <x:out ... />
> >     Jeff> </c:set>
> >
> >     Jeff> I can now dump it out happily using <c:out>
> >
> >     Jeff> It turns out that this particular value (an integer) is useful
> in a
> >     Jeff> subsequent JSP page (if my user elects to go there by clicking
> the
> >     Jeff> appropriate link). So I want to pass it as a parameter when I
> link to that
> >     Jeff> next page.
> >
> >     Jeff> Aha! the <html:link> allows me to add parameter information.
But
> it appears
> >     Jeff> that such info must be in a bean.
> >
> > Try using "<c:url>" and "<c:param>" to build up a url with parameters,
> then
> > reference the "${url}" variable from the "href" attribute of
> "<html:link>".
> >
> > ===================================================================
> > David M. Karr          ; Java/J2EE/XML/Unix/C++
> > [EMAIL PROTECTED]   ; SCJP; SCWCD
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to