getparameter - get a value from url - jsp -


hello! have url www.someurl.jsp?param=1 , want store 1 variable

i wrote this

<% int r=request.getparameter("param");%> 

and have error "incompatible types ,required:int, found:string" wrote this

<% int r= (int) request.getparameter("param");%> 

but doesnt work also...

request.getparameter("param") return string.so need convert int.for need typecasting

like

<% int r=integer.parseint(request.getparameter("param"));%> 

Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -