Solved

problem with getting request parameters.

Posted on 2002-05-20
4
154 Views
Last Modified: 2010-04-01
Users input in the address bar of IE as follows.

1.http://localhost/index.jsp
2.html://localhost/index.jsp?search
3.html://localhost/index.jsp?search=para1
4.html://localhost/index.jsp?insert=para1

I want to redirect URL each case.

How can I determine?
0
Comment
Question by:iamjhkang
  • 2
  • 2
4 Comments
 
LVL 1

Author Comment

by:iamjhkang
ID: 7021196
I want a conditional statement for filtering each of them.
Thanks.
0
 
LVL 19

Accepted Solution

by:
cheekycj earned 50 total points
ID: 7021666
<%
   if (request.getParameter("search") != null) {
      response.sendRedirect("URL IF Search parameter exists");
   }
   else if (request.getParameter("insert") != null) {
      response.sendRedirect("URL IF Insert parameter exists");
   }

%>

and so on.

Now if you want to filter the values inside those parameters just nest if-then-else statements inside the ones above.

HTH,
CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 7024298
Glad I could help and thanx for the "A"

CJ
0
 
LVL 1

Author Comment

by:iamjhkang
ID: 7026467
You're very welcome.
You deserve it.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SimpleDateFormat.parse examples 19 98
squirrelPlay java challenge 40 158
Retrieving file from bytes array in spring mvc 8 62
spring example errors 33 412
Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

860 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