|
 |
pro_jsp thread: JSP & Bean & Class
Message #1 by "Lai" <lai.kiat.sing99@m...> on Sun, 10 Mar 2002 20:16:29
|
|
Hi!, can you help me on this ?
My JSP Location:
C:\Program Files\Apache Tomcat 4.0\Webapp\login\jsp\
and my Bean Location:
C:\Progran Files\Apache Tomcat 4.0\Webapp\login\WEB-INF\classes\
The problem is, one of my JSP page also make a call to another Bean which
is located on another folder, i.e.
C:\Documents and Settings\db2admin\jbproject\BSKL\classes
Is it possible to do so?
Someone suggest me to import the class file into my JSP, and the following
are the situation:
My target class (testclass.class) located at
C:\myclass\test\
and I modifed the classpath in catalina.bat as follow:
rem ----- Set Up The Runtime Classpath ------------------------------------
----
set CP=C:\myclass\test\;%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%
\lib\tools.jar
if "%JSSE_HOME%" == "" goto noJsse
set CP=%CP%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%
\lib\jsse.jar
:noJsse
set CLASSPATH=%CP%
echo Using CATALINA_BASE: %CATALINA_BASE%
echo Using CATALINA_HOME: %CATALINA_HOME%
echo Using CLASSPATH: %CLASSPATH%
echo Using JAVA_HOME: %JAVA_HOME%
and my JSP as follow
<%@ page import="testclass" %>
but the follow error occurs
org.apache.jasper.JasperException: Unable to compile class for JSP
C:\Program Files\Apache Tomcat 4.0
\work\localhost\login\jsp\trade\tradeprocess$jsp.java:4: Class testclass
not found in import.
import testclass;
^
1 error
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:546)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary
(JspServlet.java:177)
what is the problem ? thank you !
|
|
 |