• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Passing parmameter from jsp to action page

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
In my banking application, the ShowPayees.jsp displays all the payees for a user. Then each payee has an edit/delete link next to it. If the user clicks on the edit link next to a payee, that payee will be selected for editing. My question is how to I pass the selected payees' account number from the jsp page (that I have copied below) to an action page?

Since hidden fields are not secure I don't want to pass the account number as a hidden field.

Can I put the account number of the payee as a session attribute? How do I do it in struts? Or is there any other way to pass secure parameters?
Thanks a lot in advance!



<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<html>
<head>
<title>Show Payees</title>
</head>

<body>
<logic:present name="showPayeesForm" property="listOfPayees">
<bean:size id="numberOfPayees" name="showPayeesForm" property="listOfPayees"/>
<logic:equal name="numberOfPayees" value="0"> No Payees found </logic:equal>
<logic:greaterThan name="numberOfPayees" value="0">
<logic:iterate id="payee" name="showPayeesForm" property="listOfPayees">
<bean:write name="payee" property="name"/>  
<bean:write name="payee" property="accountNumber"/>  
<bean:write name="payee" property="addressLine1"/>  
<bean:write name="payee" property="addressLine2"/>  
<bean:write name="payee" property="city"/>  
<bean:write name="payee" property="state"/>  
<bean:write name="payee" property="zip"/>  
<bean:write name="payee" property="phone"/>  
<html:link forward="edit">Edit</html:link>/  
<html:link forward="delete">Delete</html:link>

</logic:iterate>
</logic:greaterThan>
</logic:present>
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic