In test1.jsp I am trying to see what is the value of rep and based on that I change the Form element dynamically. What I need is I don't want the user to go change the rep value in url to 0 or 1 or 2 or 3. How do I control this? Also, if he changes to rep value to other than 1 I want to redirect him to test.jsp page. how to do this
How do I do that?
[ August 26, 2004: Message edited by: shan javan ] [ August 26, 2004: Message edited by: shan javan ]
test.jsp contains a form with four links/buttons named ReportA to ReportD.
When a button/link is clicked, test.jsp is submitted to a controller servlet
The servlet identifies which button/link was clicked by checking a request parameter, sets the appropriate rep value and forwards the request to test1.jsp (or to separate JSPs for each report?)
test1.jsp then presents the appropriate report; you could perhaps look at using an include for that
The user never gets to see the report parameters in the URL.
Does that help at all?
posted 14 years ago
If you don't want to expose the req params in the URL, you need to submit via a POST (where the params are sent in the body of the response), or do some fancy footwork with frames (not a recommended approach).
Bear in mind that anyone with an ounce of knowledge can still figure out what the params are even if you hide them from the address bar. [ August 26, 2004: Message edited by: Bear Bibeault ]
My crystal ball is malfunctioning; what does 'does not work' mean exactly? What does happen?
I'm also assuming that all the mistakes in your post that would cause the page to not compile are transcription errors? Please be careful when posting code that it is exactly like what you are really using so no one wastes time chasing those down. (For example, the lack of quotes in the forward action). [ August 26, 2004: Message edited by: Bear Bibeault ]