[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Re-display JSP page with form

Posted on 2006-05-02
3
Medium Priority
?
193 Views
Last Modified: 2010-08-05
Hi Guys,
I am designing a Accommodation web page(.jsp page) which contains an availability enquiry form which a user can use to enquire if the accommodation is available for a period or not.

<form name="CheckAvail" ACTION='insert_enquiry.jsp' METHOD="POST">

The action of this form is another jsp page which inserts the enquiry into a database and also checks if the period is already booked.
I have all the logic for checking if already booked working.

I am now wondering if there is a way that I can redisplay the CheckAvail form with users previously entered data so as they can change their period of enquiry if they wish??
0
Comment
Question by:Barry Cunney
1 Comment
 
LVL 28

Accepted Solution

by:
rrz earned 200 total points
ID: 16590356
In Accommodation.jsp  you could use something like this.
<%
  String checkAvailability = (String)session.getAttribute("checkAvailability");
  if(checkAvailability == null) checkAvailability = "";
%>
and in form  
<input type="text" name="checkAvailability" value="<%=checkAvailability%>"/>
and in insert_enquiry.jsp  you could use  
<%
   String checkAvailability = request.getParameter("checkAvailability");
   if(checkAvailability == null) checkAvailability = "";
   session.setAttribute("checkAvailability" , checkAvailability);
%>
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I came across an unsolved Outlook issue and here is my solution.
Last month Marc Laliberte, WatchGuard’s Senior Threat Analyst, contributed reviewed the three major email authentication anti-phishing technology standards: SPF, DKIM, and DMARC. Learn more in part 2 of the series originally posted in Cyber Defense …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Loops Section Overview
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question