Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

problem with getting request parameters.

Posted on 2002-05-20
4
Medium Priority
?
160 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 200 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: 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.

Question has a verified solution.

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

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
In this post, I will showcase the steps for how to create groups in Office 365. Office 365 groups allow for ease of flexibility and collaboration between staff members.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Loops Section Overview
Suggested Courses

886 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