File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Passing paramter from jsp to action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing paramter from jsp to action class" Watch "Passing paramter from jsp to action class" New topic
Author

Passing paramter from jsp to action class

netto gaurav
Greenhorn

Joined: Jan 29, 2008
Posts: 7
hi i have a same problem
i have an list of records on one column i have the edit image which when clicked opens the record for editing now I'm not getting how to pass the value to the action class and how to get the values of the telephone at the action

the code is below:

code:


<logic: present name ="ListArtist">
<logic:iterate id="ListArtist" name="ListArtist" indexId="i">
<tr>
<td><bean:write name="i"/></td>
<td><bean:write name="ListArtist" property="name"/></td>
<td><bean:write name="ListArtist" property="telephone"/></td>
<td><bean:write name="ListArtist" property="countryName"/></td>
<td><a href="artist.do?method=updateArtist&email="><img src='<html:rewrite page="/images/actionEdit.gif"/>' width="18" height="15" border="0" /></a></td>
<td><img src='<html:rewrite page="/images/delete.png"/>' /></td>
</tr>
</logic:iterate>
</logic: present>



please reply its urgent
Alaa Nassef
Ranch Hand

Joined: Jan 28, 2008
Posts: 460
Hello Netto,

What you have in the code snippet you wrote is going to simply be transformed into dumb HTML code that you can't pass to the action. What you should do is to have a form, and have the parameters that you want to pass to the action as html inputs, so that when you submit the form, those parameters are passed to the action.


Visit my blog: http://jnassef.blogspot.com/
Ron Yoshimochi
Greenhorn

Joined: Oct 06, 2003
Posts: 3
Hi

I have used this to pass parameters from a jsp into an action class


where the action class looks something like the one below

Michael Stains
Greenhorn

Joined: Mar 07, 2008
Posts: 5
Hi, how can I retrieve the value of

<bean:write name="cat" property="catid" />

in the action class ?
soma lingam
Greenhorn

Joined: Apr 26, 2007
Posts: 19
request.getParameter("..") using in action class is considered as security issue can anybody suggest by giving an example how to avoid using the above attribute in my struts application.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing paramter from jsp to action class
 
Similar Threads
re:struts dynamic radio buttons
search form showing previous results
Problem set session attribute
how to pass parameter in struts ?
How to add parameters to the action dynamically