?
Solved

hidden Variables

Posted on 2006-06-26
4
Medium Priority
?
378 Views
Last Modified: 2010-03-31
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
Comment
Question by:rmvprasad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 92

Expert Comment

by:objects
ID: 16989574
add input tag insoide your form fopr each hidden var

<input type="hidden" name="varname" value="varvalue"/>
0
 
LVL 35

Expert Comment

by:girionis
ID: 16990372
For more info have a look here: http://www.tizag.com/htmlT/htmlhidden.php
0
 
LVL 3

Accepted Solution

by:
ss_p earned 500 total points
ID: 17009546

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

b.jsp

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

Is this wat you want
0
 
LVL 3

Expert Comment

by:ss_p
ID: 17016344
did my code help you my friend
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question