|
-
Aug 27th, 2007, 04:18 AM
#1
Thread Starter
Hyperactive Member
Netbeans: Accessing Objects
Hi
I wish to access the objects of one JSP page on another.
And they are not accessed by making their instances.
For example if I had to access an integer 'a' of a page say 'Items'
I want to access or check the value of this object on other page say 'Selected Items'.
I have made object of the page 'Items' on page 'Selected Items'. Then using the object of 'Items' say 'ob' the value of 'a' cannot be accessed.
Using 'ob' the integer 'a' can be shown on the autocomplte list and can be brought (typed) to the 'Selected Items' page without error but the value of it modified on page 'Items' cannot be accessed.
I have no idea please help urgently
Thanks in Advance
-
Aug 27th, 2007, 06:48 AM
#2
Re: Netbeans: Accessing Objects
use query strings, or session variables to pass from one page to another then fill the values on load
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Aug 27th, 2007, 07:09 AM
#3
Thread Starter
Hyperactive Member
Re: Netbeans: Accessing Objects
 Originally Posted by ComputerJy
use query strings, or session variables to pass from one page to another then fill the values on load
How?
Please tell the methods? Please give examples if u can. If u cannot provide tell me the links to read about them.
I have searched google and it is not helping me either
Thanks
Last edited by Abbas Haider; Aug 28th, 2007 at 02:25 AM.
-
Aug 28th, 2007, 02:51 PM
#4
Re: Netbeans: Accessing Objects
here's a JSP code sample:
PHP Code:
<%
try{
response.sendRedirect("test2.jsp?x=5");
}catch(java.io.IOException ex){ex.printStackTrace();}
%>
on the "test2.jsp" page:
PHP Code:
<%= request.getParameter("x") %>
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|