HttpServletRequest.getAttribute() and HttpServletRequest.setAttribute() go together like peas and carrots. The existance of one is only justified by the existance of the other.
But to your question, setAttribute() is used for putting
Objects into the request and getAttribute() is used for getting those previously placed
Objects back out. If your application never uses setAttribute than consequently there will never be a reason to call getAttribute().
Now, I get the feeling what you are really trying to do is get at the HTTP request parameters. This is a slightly different beast. HTTP parameters are all passed as
Strings (as opposed to Objects) and are available via readonly access. The way to get to these parameters is by using HttpServletRequest.getParameter(). As you seem to be pretty new to the Servlet/JSP world I
highly that you run out and pick up a copy of a good Servlet book (see the
Bunkhouse for some ideas). Otherwise you are in for a world of pain as you learn the ropes.