473,626 Members | 3,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to pass data back and forth between ASP and JSP page?

How to pass data back and forth between ASP and JSP page?

Let's say I have Java objects, how to pass the data back to ASP page?? Or
ASP has data,
how to pass the data to JSP page??

Please advise. Thanks!
Jul 19 '05 #1
2 4593
Generally speaking you can pass variables from page to page on the same
Web site by:

1) Posting form fields from one page to the next (or to the same page)
and on the page to retrieve the value strLName = Request.Form("L Name")

2) Using a querystring such as Response.Redire ct
"login.asp?lnam e=smith&fname=t om" and on the page to retrieve the values
strLName = Request.QuerySt ring("lname") and strFName =
Request.QuerySt ring("fname")

3) Using session variables such as Session("LName" ) = "Smith" and on the
page to retrieve the value strLName = Session("LName" )

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #2
Thanks!! Bullschmidt. So your solution is to pass data by query string, and
it must use SUBMIT button and choose GET or POST protocol. Right?

When we post form fields (GET or POST protocol), we need to use submit
button, and it will send the form to the server for each click of submit
button. And we can't use regular button. Correct?

page1.asp
<form action="page2.a sp" method="get">
<P>First Name: <input type="text" name="fname">
<P>Last Name: <input type="text" name="lname">
<P><input type="submit">
</form>

page2.asp
<P>first name from page1.asp = <% Request.QuerySt ring("fname") %>
<P>Last name from page1.asp = <% Request.QuerySt ring("lname") %>
In this example, page1.asp will send the form to the IIS for request on
page2.asp, and page2.asp is the response page. That means it will go through
the server anyway. Is it possible not going through the server, but just
page1.asp and page2.asp interactions???

Please advise. thanks!

"Bullschmid t" <pa**@bullschmi dt.com-nospam> wrote in message
news:Ol******** ******@TK2MSFTN GP11.phx.gbl...
Generally speaking you can pass variables from page to page on the same
Web site by:

1) Posting form fields from one page to the next (or to the same page)
and on the page to retrieve the value strLName = Request.Form("L Name")

2) Using a querystring such as Response.Redire ct
"login.asp?lnam e=smith&fname=t om" and on the page to retrieve the values
strLName = Request.QuerySt ring("lname") and strFName =
Request.QuerySt ring("fname")

3) Using session variables such as Session("LName" ) = "Smith" and on the
page to retrieve the value strLName = Session("LName" )

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3852
by: vishal | last post by:
when a user clicks on a hyperlink i want to pass data to linked page. but what i want is that this data should not be visible to user. i mean is there any way that i can pass data except get method when user click on hyper link??? thxs
6
2271
by: Perdit | last post by:
My 1st page calls a 2nd that uses same data from a database. What is the best way to get the data in the second: a new call to the database or passing array through session variable?? I seems to me that avoiding a new call will speed up things but my concerne is that I have read many posts with caution messages againts session vars. Has anybody tested session var stability in this common scenario?
0
2438
by: Matt | last post by:
My problem is to allow ASP to interact with JSP, and I pass JavaScript object in my approach, but I wonder if it will work in network, not just in local machine. For testing purposes, the following are page1.html and page2.html that use Array JavaScript object to pass data back and forth. page1.html is able to transfer data to page2.html, but page2.html has trouble to transfer data back to page1.html.
2
1831
by: tina.boroff | last post by:
I didn't know what to use as a title for this. Here is the scenario: I have a op.reqedit.php page. This page a form where you input data. In this page I have split a MySQL field. It is called MachineTypeOfWork and is split into Replace, Adjusted, REbuild, Inspected and Repair. These all become check boxes for the user. The form submits to op.reqadd.php. In this page I first have a hidden box where I combine all of the above into...
2
2025
by: Mike | last post by:
I have an ASP.NET webform that has an HTML button (with an onClick event that calls a javascript function) and a Web Forms button (the code behind click event saves data back to a SQL DB). The javascript function basically creates a variable such as: var someStrings = "foo1.jpg,foo2.jpg,foo3.jpg,foo4.jpg" I really need to be able to access this javascript variable from the Click event of my Web Forms button so that I can pull the...
0
911
by: Swaroop | last post by:
I want to pass large amount of data to cfm page through .NET compact framework application(C#.NET). How can I do it?
17
7068
by: Rabbit | last post by:
Hi, On my 1st page, i have a function which gets a new ID value and need to transfer to another immediately. which I want to get in 2nd page using Request.form("txtID"), but doesn't work, the returned value is "" Anybody know how to set this value on 1st page properly, in order to let 2nd page catch it? I don't want to use querystring to pass this value!
4
1983
by: dmorand | last post by:
I'm curious as to how you all pass data back to the calling page when using AJAX. I have a button on a page which when clicked calls a coldfusion page to perform a query to retrieve some employee info. I have the response being sent back in a comma delimited format. Is there a better way to pass the data back? <cfquery name="employeeExists" datasource="Performance_Eval" dbtype="ODBC"> select...
2
3307
by: pqsoftware | last post by:
I need to pass data from one web page to another. For example I have 10 products, when the user clicks the price of the product I need to load a new page which can display data from the first page such as description, price, quantity etc. not sure if i need to do this in PHP or if it can be done in HTML? Any help appreciated. thanks
0
8268
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
8707
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
8641
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...
1
8366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7199
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
4093
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
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1812
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1512
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.