aspose file tools*
The moose likes Struts and the fly likes Using bean:write with html:link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using bean:write with html:link" Watch "Using bean:write with html:link" New topic
Author

Using bean:write with html:link

SivaC Kumar
Greenhorn

Joined: Apr 18, 2006
Posts: 2
I am trying to send a value as a request variable to action class.But I am getting an exception.
My code is
<logic:iterate name="searchResultsForm" id="results" property="searchResults" type="com.ng.wft.wl.form.SearchUserForm" scope="session">
<tr>
<td><html:link action="/searchUser.do?user=<bean:write name="results" property="userId"/>&methodToCall='showDetails'"><bean:write name="results" property="userId" /></html:link></td>
<td><bean:write name="results" property="firstName" /></td>
<td><bean:write name="results" property="lastName" /></td>
</logic:iterate>

but it is giving a servlet Exception


[ServletException in:/content/jsp/admin/searchResults.jsp] /content/jsp/admin/searchResults.jsp(24,73) equal symbol expected'

this is code where the exception is coming

><html:link action="/searchUser.do?user=<bean:write name="results" property="userId"/>&methodToCall='showDetails'"><bean:write name="results" property="userId" /></html:link></td>


Can any one help me Plz!!!
Satish SN
Ranch Hand

Joined: Apr 19, 2005
Posts: 70
Hi Siva,

i think ur line has a formatting problem ie u cannot have double quotes inside a double quotes ie for all the request params u r mentioning in the html:link u should use '' instead of "" u check and try format correctly then u r problem would be solved.


Satish SN<br />SCJP 1.4 & SCWCD 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using bean:write with html:link
 
Similar Threads
How to get results from indexed fields????
Problem with html:link paramName and paramId
Making a bean collected from a collection in a page, available in a subsequent page
Using bean:write with html:link
problem with url rewriting in sturts link