Bookmark Topic Watch Topic
  • New Topic

Can resolve symbol request  RSS feed

 
rushikesh kale
Ranch Hand
Posts: 41
Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi guys,
My code is: <%! String s1= request.getParameter("t1");%>
<%try {%>
<%! int i=Integer.parseInt(s1);%>
<% }
catch(Exception e)
{
e.printStackTrace();
}
%>
Error is:
C:\Java\jws\tmpdir\default\pagecompile\jsp\_OrderMain.java:26: cannot resolve symbol
symbol : variable request
location: class pagecompile.jsp._OrderMain
String s1= request.getParameter("t1");

Please help me!!
 
Maybach Smith
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Report post to moderator
JSP declarations do not have access to automatically defined variables like request, response etc.
Please go through this
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-JSP.html
for understanding this.
Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Why did you start a new thread to ask the same question?

It was answered 3 times for you here:
http://www.coderanch.com/t/286486/JSP/java/Integer-parseInt
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!