|
|
Get/Post with JSP
Hi,
JSP getParametr() will get a value from the URL. When the form uses
mehtod=Post on the html page and user submit the form, are the input
values appended to the URL? I read a book saying so. But another
book says the input values are appended to the URL only when the form
uses mehtod=get.
Could you help me on this?
Chris
|
|
0
|
|
|
|
Reply
|
yma2037 (32)
|
12/17/2003 10:32:22 PM |
|
chirs wrote:
> Hi,
>
> JSP getParametr() will get a value from the URL. When the form uses
> mehtod=Post on the html page and user submit the form, are the input
> values appended to the URL? I read a book saying so. But another
> book says the input values are appended to the URL only when the form
> uses mehtod=get.
>
> Could you help me on this?
>
> Chris
The second book is correct: only on a GET are the parameters passed
as part of the URL.
|
|
0
|
|
|
|
Reply
|
bitbucket44 (1434)
|
12/17/2003 11:01:12 PM
|
|
"chirs" <yma@kicon.com> wrote
> JSP getParametr() will get a value from the URL. When the form uses
> mehtod=Post on the html page and user submit the form, are the input
> values appended to the URL? I read a book saying so. But another
> book says the input values are appended to the URL only when the form
> uses mehtod=get.
It's true that only GET will append the parameters to the URL so they'll be
visible in the browser window.
However... that doesn't mean that the 'getParameter' method won't work if
the data was POSTed to you. I'm sort of reading between the lines of your
message. You say, "getParameter() will get a value from the URL". That's
not entirely correct... getParameter() will retrieve a request parameter,
regardless of how it got to you, either GET or POST.
Hope that helps...
--
Wendy in Chandler, AZ
|
|
0
|
|
|
|
Reply
|
wendywds (276)
|
12/17/2003 11:11:44 PM
|
|
"Wendy S" <wendywds@hotmail.com> wrote in message
news:brqnrq$bmu$1@news.asu.edu...
> "chirs" <yma@kicon.com> wrote
> > ...But another
> > book says the input values are appended to the URL only when the form
> > uses mehtod=get.
....
> ...I'm sort of reading between the lines of your
> message. You say, "getParameter() will get a value from the URL". That's
> not entirely correct... getParameter() will retrieve a request parameter,
> regardless of how it got to you, either GET or POST.
Thanks Wendy! That answers one of the 1001
nagging questions _I_ have at this moment.. :-)
|
|
0
|
|
|
|
Reply
|
andrew64 (666)
|
12/18/2003 5:04:56 AM
|
|
|
3 Replies
33 Views
(page loaded in 2.939 seconds)
Similiar Articles: Passing checkbox values from one JSP page to another - comp.lang ...Hi, I'm trying to get user selections (using checkboxes) on one JSP page(A.jsp) and pass them on to ... Post Question | Groups ... Java Application to HTML FORM Post errors - comp.lang.java.help ...NO TITLE... of an electronic commerce application is an HTML form in ... The Bean That Handles the Form Data (namehandler.java) ... In a JSP application, GET and POST ... URL Parameter Encryption - comp.lang.java.securityOn Page2.jsp a list of links each one representing a picture the user is allowed ... thought that the URL was encrypted as a parameter to the HTTP command (e.g., GET, POST). POST request to SSL/HTTPS URL - comp.lang.java.programmer ...How to use HTTPS in login page, and HTTP in following pages ..... jsp</url-pattern> <http-method>GET</http-method> <http-method>POST ... HTTP requests to the login page ... get static variable from class into JSP tag scope - comp.lang.java ...... variable in a class that I wish to share with some ofmy JSP code. Can I use the (or any tag?) to get ... Post Question | Groups ... Programming using JSP and Tomcat: cannot be resolved to a type ...Please do not top-post (corrected). Arne Vajhøj wrote: >> So you have a ... Java Server Pages (JSP), Java Programming Language, Java ... getting, error ... Solaris 10 update 05/08 is released - comp.unix.solarisSolaris 10 update 05/08 is released. http://www.sun.com/software/solaris/get.jsp ... Post Question | Groups | ... Is there a place I can download SUNWlucfg from? - comp.unix ...[I filter all Goggle Groups posts, so any reply may be automatically ignored] ... the lastest media for testing from here: > http://www.sun.com/software/solaris/get.jsp ... Export HTML table inside JSP to Excel using Java - comp.lang.java ...When I generate this table inside this JSP page, it will ... Post Question | Groups ... to export the HTML tableinto an Excel sheet (which get ... web application: how to get the currently logged in user? - comp ...Hi, i want to get the username of the currently logged in user (system login on a windows domain) with a jsp or a servlet. ... Post Question ... How to work with POST method in jsp page - JSP Tutorials,EJB ...This is detailed JSP code, how to use POST method instead of GET method in jsp page. GET is default method for sending the request to the server. Post Method of the Form In JSP - JSP Tutorials,EJB Tutorial,JDBC ...This section provides you the best illustration of the post method of the form in JSP. Post Method of the Form In JSP This section provides you the best ... 6/28/2012 8:40:37 PM
|
|
|
|
|
|
|
|
|