Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

problem with getting request parameters.

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
iamjhkang
Asked:
iamjhkang
  • 2
  • 2
1 Solution
 
iamjhkangAuthor Commented:
I want a conditional statement for filtering each of them.
Thanks.
0
 
cheekycjCommented:
<%
   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
 
cheekycjCommented:
Glad I could help and thanx for the "A"

CJ
0
 
iamjhkangAuthor Commented:
You're very welcome.
You deserve it.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now