jaggernat
asked on
controlling display of data in jsp page
hi experts
I have a submit button in my jsp page and on submit it goes to the action class and displays the data. Displaying of data is
done in jsp and this peice of code in the jsp does that :
jsp code:
<div>
<%
if(session.getAttribute("l ogrepor") != null) out.println((String)sessio n.getAttri bute("logr epor"));
%>
and i am setting it in the session in action class. like this
session.setAttribute("logr eportresul t", lines.toString());
so when i hit submit button i see the data of --> out.println((String)sessio n.getAttri bute("logr epor"));
in my jsp page
The problem is hereafter when ever the jsp page loads it shows me the data in
out.println((String)sessio n.getAttri bute("logr eportresul t"));
since it is set in session and its displaying it from session
is there any way i can change the code so that i can see --> out.println((String)sessio n.getAttri bute("logr epor"));
only when i hit the submit button and not everytime the page loads
any responces greatly appreciated
thanks
J
I have a submit button in my jsp page and on submit it goes to the action class and displays the data. Displaying of data is
done in jsp and this peice of code in the jsp does that :
jsp code:
<div>
<%
if(session.getAttribute("l
%>
and i am setting it in the session in action class. like this
session.setAttribute("logr
so when i hit submit button i see the data of --> out.println((String)sessio
in my jsp page
The problem is hereafter when ever the jsp page loads it shows me the data in
out.println((String)sessio
since it is set in session and its displaying it from session
is there any way i can change the code so that i can see --> out.println((String)sessio
only when i hit the submit button and not everytime the page loads
any responces greatly appreciated
thanks
J
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
request works thanks
May be one action to handle the submit and the other action class to handle the page load. Something like dispatch action will work great in this scenario.