问题描述
Theserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionorg.apache.jasper.JasperException:UnabletocompileclassforJSP:Anerroroccurredatline:10inthejspfile:/RegisterOk.jspregisterBeancannotberesolved7://RegisterBeanregisterBean=newRegisterBean();8:Stringready=(String)request.getParameter("ready");9:if(null!=ready&&ready.equals("true")){10:registerBean.setUser((String)request.getParameter("user"));11:registerBean.setPassword((String)request.getParameter("password"));12:request.setAttribute("registerBean",registerBean);13:Stringmsg=registerBean.inputCheck();Anerroroccurredatline:11inthejspfile:/RegisterOk.jspregisterBeancannotberesolved8:Stringready=(String)request.getParameter("ready");9:if(null!=ready&&ready.equals("true")){10:registerBean.setUser((String)request.getParameter("user"));11:registerBean.setPassword((String)request.getParameter("password"));12:request.setAttribute("registerBean",registerBean);13:Stringmsg=registerBean.inputCheck();14:if(null==msg){Anerroroccurredatline:12inthejspfile:/RegisterOk.jspregisterBeancannotberesolved9:if(null!=ready&&ready.equals("true")){10:registerBean.setUser((String)request.getParameter("user"));11:registerBean.setPassword((String)request.getParameter("password"));12:request.setAttribute("registerBean",registerBean);13:Stringmsg=registerBean.inputCheck();14:if(null==msg){15:msg=registerBean.executeQuery();Anerroroccurredatline:13inthejspfile:/RegisterOk.jspregisterBeancannotberesolved10:registerBean.setUser((String)request.getParameter("user"));11:registerBean.setPassword((String)request.getParameter("password"));12:request.setAttribute("registerBean",registerBean);13:Stringmsg=registerBean.inputCheck();14:if(null==msg){15:msg=registerBean.executeQuery();16:}Anerroroccurredatline:15inthejspfile:/RegisterOk.jspregisterBeancannotberesolved12:request.setAttribute("registerBean",registerBean);13:Stringmsg=registerBean.inputCheck();14:if(null==msg){15:msg=registerBean.executeQuery();16:}17:if(null==msg){18:request.getRequestDispatcher("chengji.html").forward(request,response);Anerroroccurredatline:36inthejspfile:/RegisterOk.jspregisterBeancannotberesolved33:<frommethod="post"action="RegisterOk.jsp">34:<inputtype="hidden"name="ready"value="true">35:<p>请确认信息。<br><br></p>36:<fontcolor=red><%=registerBean.getMsg()%></font>37:<tablewidth="350"cellSpacing="2"cellPadding="5"border="1">38:<tbody>39:<tr>Anerroroccurredatline:41inthejspfile:/RegisterOk.jspregisterBeancannotberesolved38:<tbody>39:<tr>40:<td><b>用户</b></td>41:<tdwidth="60"><inputname="user"size="10"value="<%=registerBean.getUser()%>">*</td>42:</tr>43:<tr>44:<td><b>密码</b></td>Anerroroccurredatline:45inthejspfile:/RegisterOk.jspregisterBeancannotberesolved42:</tr>43:<tr>44:<td><b>密码</b></td>45:<tdwidth="60"><inputname="password"type="password"size="10"value="<%=registerBean.getPassword()%>">*</td>46:</tr>47:</tbody>48:</table>Stacktrace:org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)这怎么解决呢,求高手啊。。。。。。。。。。。。。这怎么解决呢,求高手啊。。。。。。。。。。。。。这怎么解决呢,求高手啊。。。。。。。。。。。。。这怎么解决呢,求高手啊。。。。。。。。。。。。。这怎么解决呢,求高手啊。。。。。。。。。。。。。这怎么解决呢,求高手啊。。。。。。。。。。。。。这怎么解决呢,求高手啊。。。。。。。。。。。。。
解决方案
解决方案二:
把源代码帖出来啊
解决方案三:
//RegisterBeanregisterBean=newRegisterBean();这行都被你注释掉了,registerBean当然找不到定义了。
解决方案四:
typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisrequest.exceptionorg.apache.jasper.JasperException:UnabletocompileclassforJSP:Anerroroccurredatline:7inthejspfile:/RegisterOk.jspRegisterBeancannotberesolvedtoatype4:<%@pageimport="java.sql.PreparedStatement"%>5:<%@pageimport="java.util.*"%>6:<%7:RegisterBeanregisterBean=newRegisterBean();8:Stringready=(String)request.getParameter("ready");9:if(null!=ready&&ready.equals("true")){10:registerBean.setUser((String)request.getParameter("user"));Anerroroccurredatline:7inthejspfile:/RegisterOk.jspRegisterBeancannotberesolvedtoatype4:<%@pageimport="java.sql.PreparedStatement"%>5:<%@pageimport="java.util.*"%>6:<%7:RegisterBeanregisterBean=newRegisterBean();8:Stringready=(String)request.getParameter("ready");9:if(null!=ready&&ready.equals("true")){10:registerBean.setUser((String)request.getParameter("user"));Stacktrace:org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)这是怎么回事啊。。。问题在那儿求解?
解决方案五:
RegisterBeanregisterBean=newRegisterBean();页面有没有把RegisterBean类import进来呀<%@pageimport="xxx.xxx.RegisterBean"%>