• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Passing paramter from jsp to action class

 
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
 
Ranch Hand
Posts: 471
Mac OS X Hibernate 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.
 
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

 
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 ?
 
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
Boost this thread!