相当奇怪`的报错```
public String codeToString(String str)
{
String S=str;
try
{
byte tempB[]=S.getBytes( "ISO-8859-1 ");
S=new String(tempB);
return S;
}
catch(Exception e)
{
return S;
}
}
public String symbol(String bit)
{
String anotherString=null;
int bitlength=0;
String S =bit;
boolean b = Pattern.matches( "[a-zA-Z0-9]* ",S);
try{anotherString = new String(S.getBytes( "GBK "), "ISO8859_1 ");}catch(Exception e){}
bitlength=anotherString.length();
if(bitlength> 5||bitlength <15)
{
return "succes ";
}
else{
return "error ";
}
}
%>
居然报这个错
org.apache.jasper.JasperException: Exception in JSP: /register/success.jsp:105
102: {
103: out.print( "SQL异常! ");
104: }
105: if((D1.equals(T1))&&(D2.equals(T2))&&(D3.equals(T3))&&(D4.equals(T4))&&(D5.equals(T5))&&(D6.equals(T6))&&(D7.equals(T7))&&(D8.equals(T8)))
106: {
107: %>
108: <script type= "text/javascript ">
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handle
JspException(JspServletWrapper.java:506)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:395)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
都不知道怎么解决`
------解决方案--------------------105行, 会不会是 D1~D8 里面,有一个是 NULL 了?
------解决方案--------------------你把 Tomcat目录下的 \work\Catalina\localhost的项目目录删了,再试试
------解决方案--------------------有没有root cause
------解决方案--------------------乱搞什么?你上面的代码和错误没联系啊.
把你的/register/success.jsp code出来