The Artima Developer Community
Sponsored Link

Java Answers Forum
Passing Parameters in JSP

2 replies on 1 page. Most recent reply: Jun 11, 2002 10:07 PM by Premjit

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
Sony.C.joy

Posts: 7
Nickname: sonycjoy
Registered: Jun, 2002

Passing Parameters in JSP Posted: Jun 11, 2002 12:04 AM
Reply to this message Reply
Advertisement
I am calling a jsp from an html page with a parameter,
but i don't want to display the parameter in the URL of the jsp page displayed.
Or is it possible to make the URL invisible of the JSP page dispalyed

Thanking you in Advance


Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Passing Parameters in JSP Posted: Jun 11, 2002 12:11 AM
Reply to this message Reply
Use method=POST on your html form that is submitting the data, instead of GET (which I believe is the default if you are not specifying it).

Premjit

Posts: 2
Nickname: jitu
Registered: Jun, 2002

Re: Passing Parameters in JSP Posted: Jun 11, 2002 10:07 PM
Reply to this message Reply
the first answer "method=post" is the most appropriate but has a limitation - only String Objects can be passed that way, if objects other than Strings are to be sent, use the session object as :
session.setAttribute(key, value) and retrieve it in another page by :
session.getAttribute(key). this works for all types of objects.

Flat View: This topic has 2 replies on 1 page
Topic: JDBC-ODBC Bridge Driver Previous Topic   Next Topic Topic: tough java question

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use