permaculture playing cards*
The moose likes JSP and the fly likes possible variable type, a form parameter can have 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 "possible variable type, a form parameter can have" Watch "possible variable type, a form parameter can have" New topic
Author

possible variable type, a form parameter can have

pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
what are the possible variable type, a form parameter can have?

string, int, char, float and long. that's all. right.

request.getParameter() always returns string. and it can be converted to all possible variable types specified above.

any other variable type possible?

thanks in advance.


:d
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Not an HTML/JavaScript question. I am moving it to JSP.

Eric
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Form parameters are always sent to the server as text.

The type used to represent it on the server, depends on the technology you're using on the server. With Servlets & JSP, the values will be of type java.lang.String or, if there is more than one with the same name, java.lang.String[]


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
 
subject: possible variable type, a form parameter can have
 
Similar Threads
doubt in Session parameters
Dispatch Action Issue/Exception
Retrive data from requst object without using getParameter()
Type mismatch with generics
Calling a method