• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

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