how to use a href in struts JSP?
1 posts in topic
Flat View  Flat View

Posted By:   Ong_CY
Posted On:   Monday, October 22, 2001 02:42 AM

hi all,

i try to pass dynamic data using a href but it seems fail to work in struts.

original JSP:


Struts JSP:

<%=bean.getFILENAME()%> ;

i can't get the <%=bean.getFILENAME()%> value when using struts.can anyone help?


Re: how to use a href in struts JSP?

Posted By:   Ted_Husted  
Posted On:   Monday, October 22, 2001 10:54 AM

The html:link tag is designed so that you can do that
without resorting to scriptlets. Try:

paramProperty="FILENAME" paramId="filename"/>

(Though, you may have problems unless the accessor is
named getFilename, per the conventions.)


Personally, I discourage use of the page form of html:link,
and always use global forwards instead. This way all the
entry points to your application are documented, and
you don't have to expose API features like "action=w"
in the JSP. You can give the action=w forward a logical name,
and use that instead.

In struts-config: