I call jsp from a servlet.My servlet locates at 
F:\myeino\eino\WEB-INF\classes\eino\GetUserIdentity.class
My servlet's war locates at F:\myeino\loginwebapp.war
My jsp locates at F:\myeino\eino\error.jsp

>From servlet,I call jsp at follow statements:

String str="hello";
request.setAttribute("jsp",str);
/*follow statement is 183 line,when I execute follow statement,I got error*/
getServletConfig().getServletContext().getRequestDispatcher("loginwebapp/error.jsp").forward(request,response);

My jsp is follows:

<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
error
</title>
</head>
<body>
<h1>
JBuilder Generated JSP
</h1>
  <%
   String message;
   message=(String)request.getAttribute("jsp");
   out.write("<H1>"+message+"</H1>");
  %>
</body>
</html>

When I call jsp from servlet,I got errors:
java.lang.NullPointerException

 at eino.GetUserIdentity.doPost(GetUserIdentity.java:183)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:263)
 at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
 at 
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2390)
 at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1959)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

I thought this error for several days,but I still found where is error.Please help!
Thanks in advance!!!
Edward

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to