oaklanders
Technical User
- Dec 9, 2007
- 38
How do I fetch a request value in a Java class?
Here is my attempt but it has request object error:
Code:
public class First
{
private HttpServletRequest request;
private String lastname;
public First()
{
lastname= request.getParameter("lastname");
}
public FetchFormValue()
{
if(lastname.equals("Smith")
{
//do stuff for Smith
}
else
{
//do other stuff
}
}
..
}