Solved

problem with getting request parameters.

Posted on 2002-05-20
4
153 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Employees depend heavily on their PCs, and new threats like ransomware make it even more critical to protect their important data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
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 …

808 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