|
Pass variables between jsp pages
|
|
09-03-2009, 08:59 PM
Post: #1
|
|||
|
|||
|
Pass variables between jsp pages
can ane1 tell me how to pass variables between two jsp pages.
I have obtained the IP Address in the first page and want to save it to the MS Access table by clickin on a hyperlink which takes me to the nxt page. The problem is how to pass the value of ip address to the nxt page. I have tried using this code: <a href="SaveIPAddress.jsp"?ipAdd=<%= ipAddress %>> but this line of code shows an error. *ipAddress is the String variable in which the IP address is stored. PLZ help me its URGENT!!!! |
|||
|
09-04-2009, 02:45 AM
Post: #2
|
|||
|
|||
|
RE: Pass variables between jsp pages
Your code should work. I don't see any issue with that. However you need a small change to make it working.
Code: <a href="SaveIPAddress.jsp?ipAdd=<%= ipAddress %>"> |
|||
|
09-05-2009, 08:25 PM
Post: #3
|
|||
|
|||
|
RE: Pass variables between jsp pages
Thanku ...... dat was useful......
Can u plz help me at mre thng..... I want to open a jdbc connection on the first page bt want to use it on the other pages....means i want dat once the home page is loaded a connection to msaccess gets open and im able to use it to insert data later on from other pages. Also, i want to access certain variables through out the pages. How can i use them?? Thanks in advance. |
|||
|
09-07-2009, 06:01 PM
Post: #4
|
|||
|
|||
|
RE: Pass variables between jsp pages
For reusing the connection in different pages you may need to keep the connection in HttpSession or in servlet context.
For accessing a variable from different pages also you can keep it either in session or in context. |
|||
|
« Next Oldest | Next Newest »
|

Search
Member List
Calendar
Help




