Solved

problem with getting request parameters.

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
J2SE 5.0 metadata 1 67
grep code 4 205
Clear browser cache on site login, is it possible? 3 34
Suggestion on WebSite Template Sites 6 116
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
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 …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

685 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