Hi

I never thought one could directly convert from string to int

why dont you try this

(Integer.parseInt(request.getParameterValues("Position"))   )+ 1;


hope this helps

Amit
> -----Original Message-----
> From: Reeta Mittal [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, December 13, 1999 1:30 PM
> To:   [EMAIL PROTECTED]
> Subject:      String- Integer
>
> Hello Everyone,
>
> I am facing a very basic problem.
> I am having a text box in my jsp page which will always have Integer
> values. Now by default all values from a text box are of type strings. Now
> how can I convert this to int type. I am using following line but it is
> giving error because we can not cast from primitive type to reference
> type.
>
> Position=(int) request.getParameterValues("Position") + 1;
>
> Can anybody tell me the way of doing this ?
>
>
> Thanx and Regards,
> Reeta
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to