Hi, Randy,

Thanks a lot for your information.

Here is my situation:

My older tomcat is version 3.3 and new tomcat is version 4.0.2.

This is the script in the older tomcat directory(very simple one):

<%@ page language="java" contentType="text/html" %>
<%@ page info="Simple testing program" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.net.URL" %>

<%@ include file="includes/js_include.txt" %>

<html>
<head>

<%  String inputString = "passwd";
    jcrypt jcrypt = new jcrypt();
    String cryptedPassword = jcrypt.crypt("MM", inputString);

%>

<title>Simple testing program</title>
</head>
<%= inputString %> and <%= cryptedPassword %>

</html>


But under the new version of tomcat, this won't work until I put a line <%@
page import="jcrypt" %>    at the beginning. I've put my jcrypt.class file in
WEB-INF/classes and under $CATALINA_HOME/classes as well and restart the
tomcat and apache. Still seems not working.

I just read the documentation from jakarta site and you are right, tomcat 3.3
and above version ignore the CLASSPATH variable. But my question is, my older
version tomcat is 3.3 and new one is 4.0.2. Why does this script work under
the older one and not the new one?

Thanks a lot for your help.

Ming

Randy Layman wrote:

>         All versions of Tomcat (and all JSP containers for that matter)
> require you to add <%@ page import="...."%> to your JSP files.
>
>         Also, Tomcat versions 3.3 and beyond ignore your system's classpath
> variable - it causes to may problems with people not understanding how this
> interacted with the web apps.
>
>         Lastly, lots of people have experience using JSP with Tomcat 4.02.
> If you have more specific questions please ask - this is the right forum.
>
>         Randy
>
> > -----Original Message-----
> > From: Ming [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, February 27, 2002 6:29 PM
> > To: Tomcat Users List
> > Subject: JSP programming under Tomcat 4.0.2
> >
> >
> > I'm using Tomcat 4.0..2 and apache 1.3.23. I move all my
> > class files to the
> > WEB-INF classes folder and jar files to the lib folder.
> >
> > I'm programming in JSP. But it seems that although all the
> > necessary class
> > files and jar files are in the classes and lib folder, I
> > still need to import
> > them in my JSP script. This wasn't the case before I upgraded
> > the tomcat and
> > apache.  Since the new tomcat is on the same machine as the
> > old one, the
> > classpaths are the same too.
> >
> > Does anybody have experience on programming JSP under Tomcat
> > 4.0.2? I really
> > appriciate if you can help.
> >
> > Thanks.
> >
> > Ming
> >
> >
> > --
> > To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> > For additional commands: <mailto:[EMAIL PROTECTED]>
> > Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to