473,406 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 4578
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("LName")

2) Using a querystring such as Response.Redirect
"login.asp?lname=smith&fname=tom" and on the page to retrieve the values
strLName = Request.QueryString("lname") and strFName =
Request.QueryString("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.asp" 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.QueryString("fname") %>
<P>Last name from page1.asp = <% Request.QueryString("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!

"Bullschmidt" <pa**@bullschmidt.com-nospam> wrote in message
news:Ol**************@TK2MSFTNGP11.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("LName")

2) Using a querystring such as Response.Redirect
"login.asp?lname=smith&fname=tom" and on the page to retrieve the values
strLName = Request.QueryString("lname") and strFName =
Request.QueryString("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
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...
6
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...
0
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...
2
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...
2
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...
0
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
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...
4
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...
2
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.