首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

org.apache.jasper.JasperException: Unable to load class for JSP

2013-09-11 
手机号码隐藏中间四位的问题!在线等,谢谢各位!从数据库得到号码:pcoders.getString( Phone )之后应该

手机号码隐藏中间四位的问题!在线等,谢谢各位!
从数据库得到号码:pcode=rs.getString( "Phone ");
之后应该如何处理能显示的时候隐去中间四位啊?
谢谢大家啦!

[解决办法]
pcode=rs.getString( "Phone ");
pcode=pcode.substring(0,3)+ '**** '+pcode.substring(7);

pcode= '13912345678 ';
pcode=pcode.substring(0,3)+ '**** '+pcode.substring(7);

139****5678
[解决办法]
theforever(碧海情天)解释的很清楚了怎么还提帖子?
[解决办法]
pcode=rs.getString( "Phone ");
pcode=pcode.replaceAll(pcode.subString(3,4), "**** ");
[解决办法]
theforever(碧海情天) 回答的很清楚了
[解决办法]
lhfzd2004(风之刀) 的这个方法不错。
pcode=rs.getString( "Phone ");
pcode=pcode.replaceAll(pcode.subString(3,4), "**** ");

[解决办法]
我该了代码,如下:
while(rs.next()){
pcode=rs.getString( "Phone ");
pcode=pcode.substring(0,3)+ '**** '+pcode.substring(7);
src=src+pcode+ ", ";

}
但是报错啦:
HTTP Status 500 -

--------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
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)


root cause

java.lang.ClassNotFoundException: org.apache.jsp.ly365.cj1_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
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)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.

这是什么原因啊?
[解决办法]
找不到jsp编译后的类,
建议把cj1.jsp随便改动下让Tomcat重新加载,
或者清空Tomcat主目录\work\Catalina\localhost\项目文件夹\org\apache\jsp\ly365\
[解决办法]
subString

classNotFound跟本问题无关
[解决办法]
标记!
------解决方案--------------------


substring()方法的s是小写的,不要想当然啊!
[解决办法]
好难的问题!
[解决办法]
感觉为什么这种问题需要问呢?
简单的字符串操作都不会......那还编什么程序,LZ要反省
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行