This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 24166
    
  30

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Picking up parameters in the URL
 
Similar Threads
Absolute path for jsp
response.sendRedirect expecting the wrong file
forward to jsp without using an action
struts deploy issues
Deploying Struts app on Linux server