调试好TOMCAT环境 JSP,SERVLET均运行无误.
但调试JBEAN的时候很奇怪
一,
(1)
JSP文件中引用类:
<%@ page language="java" import="bean.Counter" %> 但是Counter.class如果放在C:\TOMCAT\myapp\WEB-INF\classes\bean下
就会出现错误
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request.
root cause org.apache.jasper.JasperException: Unable to compile class for JSP
(2)
但把Counter.class放在C:\TOMCAT\myapp\WEB-INF\classes\下,虽然有时会正常运行,但偶尔也会出现上面同样的错误
(3)
如果将Counter.class同时分别放在C:\TOMCAT\myapp\WEB-INF\classes\和
C:\TOMCAT\myapp\WEB-INF\classes\bean下,
则运行无错误,一切正常,一次错误也没有
二,
JSP文件改为
<%@ page language="java" import="Counter" %>
又会出现上述一,(2)情形的有时正常有时出现错误的情形 type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. root cause org.apache.jasper.JasperException: Unable to compile class for JSP 请问是不是必须将编译好的CLASS文件分别放在根文件夹下和一个子文件夹下才行啊?
还是我哪有问题了?
但调试JBEAN的时候很奇怪
一,
(1)
JSP文件中引用类:
<%@ page language="java" import="bean.Counter" %> 但是Counter.class如果放在C:\TOMCAT\myapp\WEB-INF\classes\bean下
就会出现错误
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request.
root cause org.apache.jasper.JasperException: Unable to compile class for JSP
(2)
但把Counter.class放在C:\TOMCAT\myapp\WEB-INF\classes\下,虽然有时会正常运行,但偶尔也会出现上面同样的错误
(3)
如果将Counter.class同时分别放在C:\TOMCAT\myapp\WEB-INF\classes\和
C:\TOMCAT\myapp\WEB-INF\classes\bean下,
则运行无错误,一切正常,一次错误也没有
二,
JSP文件改为
<%@ page language="java" import="Counter" %>
又会出现上述一,(2)情形的有时正常有时出现错误的情形 type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. root cause org.apache.jasper.JasperException: Unable to compile class for JSP 请问是不是必须将编译好的CLASS文件分别放在根文件夹下和一个子文件夹下才行啊?
还是我哪有问题了?
Jbean是放在C:\Program Files\Tomcat 5.5\webapps\myapp\WEB-INF\classes\bean出的问题,
所以我把Jbean移到C:\Program Files\Tomcat 5.5\webapps\myapp\classes下 结果就出现有时好有时坏的问题,
只有在classes\下和classes\bean下都有同一个Jbean时才没问题..
头都搞大了,