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
Re: Netbeans: Accessing Objects
use query strings, or session variables to pass from one page to another then fill the values on load
Re: Netbeans: Accessing Objects
Quote:
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
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") %>