File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Picking up parameters in the URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Picking up parameters in the URL" Watch "Picking up parameters in the URL" New topic
Author

Picking up parameters in the URL

Dale DeMott
Ranch Hand

Joined: Nov 02, 2000
Posts: 515
Typically my page name and parameter list looks like this...

http://www.mydomain.com/myproject/index.jsp?firstName=Jon

Without parameters obviously it looks like this...

http://www.mydomain.com/myproject/index.jsp

The index.jsp page is registered as the default page. If I wanted to access the site with no parameters I could use this...

http://www.mydomain.com/myproject

if I wanted to use http://www.mydomain.com/myproject with parameters... could I??r would I have to have the index.jsp on the end of it.

Thanks!


By failing to prepare, you are preparing to fail.<br />Benjamin Franklin (1706 - 1790)
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

You can certainly do this with servlet-mapping in the web.xml file. I'm going to move this to our JSP Forum where they know about such things.


[Jess in Action][AskingGoodQuestions]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Have you tried it?
I would expect the query string parameters to be preserved when forwarded to a welcome page.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
wood burning stoves
 
subject: Picking up parameters in the URL
 
Similar Threads
forward to jsp without using an action
response.sendRedirect expecting the wrong file
struts deploy issues
Absolute path for jsp
Deploying Struts app on Linux server