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 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 Java 8 in Action this week in the Java 8 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: possible variable type, a form parameter can have
 
Similar Threads
Type mismatch with generics
Retrive data from requst object without using getParameter()
doubt in Session parameters
Calling a method
Dispatch Action Issue/Exception