473,608 Members | 2,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to pass two variable values from a servlet to jsp

27 New Member
hai,

I have one jsp page.In that jsp i am passing two values using the javascript function to a servlet.In that servlet i get that 2 values.And then how to pass these 2 values to another jsp page.
Aug 10 '07 #1
1 3969
muralihkrishna
3 New Member
hai,

I have one jsp page.In that jsp i am passing two values using the javascript function to a servlet.In that servlet i get that 2 values.And then how to pass these 2 values to another jsp page.
hi
communication between servlets and jsp is possible through session attributes or resquest attributes. add the 2 values to the session attributes using session.setAttr ibute() and later in the jsp you can retrieve them using session.getAttr ibute().
Aug 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
9266
by: Randell D. | last post by:
Folks, I've asked this before but never got any response but its important and I thought I'd pitch it again (hopefully a bit clearer)... One can pass data from one function to another either by passing a copy, or passing by reference. My understanding of passing by reference (putting the & before a variable during the function declaration) means that the original data is used.
2
22169
by: kaiwing18 | last post by:
Hi, I have a following jsp file called "showAsset.jsp" : <form action="showAsset.jsp" method="post"> <tr BGCOLOR=YELLOW> <td><input name="sort" type="submit" value="Asset_Number" > </td> <td><input name="sort" type="submit" value="Description"></td>
2
9241
by: umashd | last post by:
Hi, I am doing a web based project for my graduation. I studied bit of java for backend processesing and javascript for the client. Here is the scenario. In the FORM, I use INPUT TYPE=text VALUE=" " NAME=cat, and a gif next to it. User will click on the icon to get a new window. In the new window, the user selects a value from the pull down menu (created by servlet from back end) and clicks OK. The value is passed back to the
8
6573
by: darrel | last post by:
I'm still trying to fully understand how best to pass variables between pages/usercontrols/each other. On a current site I've done, I've had one userControl do the logic and set the variable, and then I had other usercontrols simply read this by traversing the class structure: siteClass.userControlClass.specficVariable. That worked fine. The new site I'm working on is a bit different, as I'm using multiple
4
2962
by: Bilwin | last post by:
Hi friends, I would like to know how can i pass values to AJAX form from a servlet and how to display that value in a drop down box. Plz help me on this since i am a newbie to this. Thanks Bilwin.
10
13637
by: Robert Dailey | last post by:
Hi, I noticed in Python all function parameters seem to be passed by reference. This means that when I modify the value of a variable of a function, the value of the variable externally from the function is also modified. Sometimes I wish to work with "copies", in that when I pass in an integer variable into a function, I want the function to be modifying a COPY, not the reference. Is this possible?
5
6063
by: xirowei | last post by:
i'm newbie in java servlet, how to let public void doPost can access to public void doGet, stringLength variable? below is my code: import javax.servlet.*; import javax.servlet.http.*; import java.io.*; public class LabWork3_Q1 extends HttpServlet {
12
11055
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
2
9404
by: vinodsk101 | last post by:
Hi all, Please help me, can any one tell me how to get list box values in servlet. i have used : <Select name="lstProjectmem" size="5" class="txbEnabledText" multiple="multiple" onChange="javascript isplay(this)"/ > <option selected>..........PROJECT MEMBERS..........</option> </select> and in servlet i wrote, String prjmem = request.getParameterValues("lstProjectmem");
0
8057
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8491
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8470
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8329
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5475
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3959
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4022
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2472
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.