Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing paramter from jsp to action class

 
netto gaurav
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ron Yoshimochi
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, how can I retrieve the value of

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

in the action class ?
 
soma lingam
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic