Duvida em setProperty?

pessoal to tendo um problema com um jsp aqui,nele eu ja tenho um bean e consigo colocar os valores nos campos, tudo certinho, o problema é qnd eu quero alterar esse bean,pra mim era so colocar o setProperty,ta dando nullException no servlet queria saber oq estou fzd d errado???
meu jsp

<jsp:useBean id="alunoBean" class="control.AlunoBean" scope="request"/>

<html>
<head>
	<title>Cadastro de Aluno</title>
	
	<script language="javaScript">
		function Submit(acao,destino)
		{	
			document.from_desvio.acao.value = acao;
			document.from_desvio.action = destino;
			document.from_desvio.submit();
		}
	</script>
	
</head>

<body>
	<form name="from_desvio" method="post" >
	<table border="0" align="center">
	 <tr>
	  <td>Nome:</td><td><input type="text" name="nome" value=<jsp:getProperty name="alunoBean" property="nome"/> /></td>
		<jsp:setProperty name="alunoBean" property="nome"/> 			 
	 </tr>
	 <tr>
	  <td>Endereço:</td><td><input type="text" name="endereco" value =<jsp:getProperty name="alunoBean" property="endereco"/>/></td>
	 
	 </tr>
	 <tr>
	  <td>Telefone:</td><td><input type="text" name="telefone" value =<jsp:getProperty name="alunoBean" property="telefone"/> /></td>
	 
	 </tr>
	 <tr>
	  <td>Email:</td><td><textarea name="email" rows="4"><jsp:getProperty name="alunoBean" property="email"/></textarea></td>
	 </tr>
	 <tr>
	  <td>Histórico:</td><td><textarea name="historico" rows="5"><jsp:getProperty name="alunoBean" property="historico"/></textarea></td>
	 
	 </tr>
	 <tr>
	 <input type="hidden" name="acao">
	 	<td><input type="Button" value="Alterar" onclick="Submit('Alterar','cadastroAluno')"/></td>
	 	<td><input type="reset" value="Cancelar"/></td>
	 </tr>
	 <!-- br><input type="button" value="Procurar Aluno" onclick="Submit('Procurar','cadastroAluno')"/-->
	 
	</table>	
	</form>
</body>
</html>

meu servlet

....
if(acao.equals("Alterar"))
			{
			    AlunoBean alunoBean2 = (AlunoBean)request.getAttribute("alunoBean");
				System.out.println(alunoBean2.getNome());//<== O ERRO			}
......

não seria request.getParameter(“alunoBean”) ???

não

retirado de:

Wesley, Addison. JavaServer Pages, Second Edition.

[quote]11.6 Using Beans from Servlets
Beans are as useful for servlet authors as they are for JSP authors but are not quite as easy to use from a servlet. Obtaining the bean is pretty straightforward, as shown in Listing 11.8, which uses the bean containing album information for Siouxsie and the Banshee’s “Tinderbox” from Chapter 3.

Listing 11.8 A servlet that uses a bean
package com.awl.jspbook.ch11;

[/quote][code]import javax.servlet.;
import javax.servlet.http.
;
import java.io.;
import java.beans.
;
import com.awl.jspbook.ch03.AlbumInfo;

public class CDInfo extends HttpServlet {
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws IOException,ServletException
{
handle(req,res);
}

public void doPost(HttpServletRequest req,
HttpServletResponse res)
throws IOException,ServletException
{
handle(req,res);
}

public void handle(HttpServletRequest req,
HttpServletResponse res)
throws IOException,ServletException
{
AlbumInfo tinderbox;

res.setStatus(res.SC_OK);
res.setContentType("text/html");

PrintWriter out = res.getWriter();

try {
  tinderbox = (AlbumInfo) Beans.instantiate(
getClass().getClassLoader(),
"tinderbox3");
} catch (Exception e) {
  tinderbox = null;
}

out.println("<HTML>");
out.println("<HEAD><TITLE>Album Info</TITLE></HEAD>");
out.println("<BODY>");

if(tinderbox == null) {
  out.println("The bean could not be found or loaded");
} else {
  out.println("<P>Album name: "
  • tinderbox.getName() + “

    ”);

    String tracks[] = tinderbox.getTracks();

    out.println(“

    Tracks:

    ”);
    out.println("
      ");
      for(int i=0;i<tracks.length;i++) {
      out.println("
    1. " + tracks[i]);
      }
      out.println("
    ");
    }

    out.println("");
    out.println("");

    out.close();
    }
    }

[/code][quote]
The call to instantiate() is what performs the real magic in this example. Here, it is used to load a serialized bean, but if it were given the name of a class instead of a file name, it would have loaded the class, called its constructor, and returned a new instance. The first argument to instantiate() is a ClassLoader, which, as the name implies, is a class that loads other classes. Every Java class can get access to the class loader that loaded it by calling getClassLoader(), and any object can get its class by calling getClass().

Once the bean is loaded, it is treated like any other class. In particular, the bean is first cast into the appropriate type, and then the methods of this class are called directly. This is not using the full power of bean introspection, which can dynamically determine the properties and methods of a bean at runtime. Introspection enables important JSP abilities, such as the automatic setting of properties from form parameters.

Servlets can do introspection, but it is beyond the scope of this book, so an example will not be provided here. More information can be found in a good book on beans or the Java documentation, starting with the getBeanInfo() method of the java.beans.Introspector class, which can be found at http://java.sun.com/beans/javadoc/java.beans.Introspector.html.

Once it has been obtained by a call to instantiate(), a bean may be stored in any of the four scopes. If a bean is placed in a scope by a servlet, a JSP can later retrieve the bean from the scope through the normal jsp:useBean tag. The reverse is also true; any bean placed in a scope by a JSP can be obtained and used by a servlet. For example, suppose that Listing 11.7 had included the following lines:

ServletContext sc = getServletContext();
sc.setAttribute(“tinderbox”,tinderbox);

In that case, a JSP could access this bean with the following tag:
[/quote]

<jsp:useBean id="tinderbox"
    class="com.awl.jspbook.ch05.AlbumInfo"
    scope="application"/>

ele usa:

tinderbox = (AlbumInfo) Beans.instantiate(getClass().getClassLoader(),"tinderbox3"); para instanciar o bean, espero que ajude agora.

Ingles??
Olha se seu problema for esse seta o objeto no seu request caso esteja de jsp .Se for no num servelet tem que usar o requestdispacher.