
July 4th, 2002, 05:00 PM
|
|
Contributing User
|
|
Join Date: Aug 2001
Posts: 181
Time spent in forums: 2 h 7 m 31 sec
Reputation Power: 12
|
|
|
problem when use bean class with JSP
I keep been class in mybean package in
c:\tomcat\webapps\Root\Web-inf\classes\mybean\somebean.class
and save jsp file in
c:\tomcat\webapps\Root\jsp\sec1\test.jsp
and I type url in http://localhost:8080/jsp/sec1/test.jsp
This work correct. and all directory such as \Root\jsp, \Root\news, \Root\webboard must use \Root\Web-inf\classes\mybean to keep class file. I have 2 question
1. When I not use package, in file somebean.java I delete line 1 (package mybean) and compile again. and I edit file test.jsp change from
<jsp:useBean id="bean1" class="mybean.somebean" />
to
<jsp:useBean id="bean1" class="somebean" />
When I run this jsp file. It has error Class org.apache.jsp.someclass not found
I try to shutdown and restart Tomcat. but it has same error.
2. When I put class file in
c:\tomcat\webapps\Root\jsp\Web-inf\classes\mybean\somebeen.class
or
c:\tomcat\webapps\Root\jsp\sec1\Web-inf\classes\mybean\somebeen.class
Why it not found class bean?
Any help please?
|