为甚麽我用request.getRequestDispatcher获得Nullpointer
request.getRequestDispatcher("index"+".jsp").forward(request,response);
严重: Servlet.service() for servlet [jsp] in context with path [/twitter3] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at org.apache.jsp.test_jsp._jspService(test_jsp.java:94)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
改成
<jsp:forward page="index.jsp"/>就好啦
[解决办法]
楼主什么意思
是问问题吗
[解决办法]
LZ看下response.sendRedirect()和request.getRequestDispatcher().forwar(request,response)的区别