[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 395
  • Last Modified:

hidden Variables

I am supposed to write a form in struts. The issue is I have to populate some of the values  of this form into other form using hidden variables. I am not aware of how to use it thoe I know the theory behind the hidden variables. I will be pleased if anyone could show me a sample code of few lines, so I can get how things work.
0
rmvprasad
Asked:
rmvprasad
  • 2
1 Solution
 
objectsCommented:
add input tag insoide your form fopr each hidden var

<input type="hidden" name="varname" value="varvalue"/>
0
 
girionisCommented:
For more info have a look here: http://www.tizag.com/htmlT/htmlhidden.php
0
 
ss_pCommented:

a.jsp
<input type="hidden" name="username" value="username"/>

b.jsp

<%
String userName = (String)request.getSession().getAttribute("username");
%>

Is this wat you want
0
 
ss_pCommented:
did my code help you my friend
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now