How to load class files in Tomcat4?

W

wayne

Hi,

All those .class have worked well in Tomcat 3. They were under
webpages (html's and jsp's)/WEB-INF/classes.

Now in Tomcat 4, they no longer work, even after re-compiling. Jsp's
can longer connect to the beans (classes). What's my problem? Yes I
noticed that all the simple jsp's did produced a .java and .class in
the jakarta-tomcat4.0/work, but all the jsp's using beans only
produced a .java not .class. Obviously, beans are "lost".

I also noticed there is a web.xml in each WEB-INF. Do I need to do
anything there for deployment?

Thanks a lot,
Wayne
 
J

Juha Laiho

(e-mail address removed) (wayne) said:
All those .class have worked well in Tomcat 3. They were under
webpages (html's and jsp's)/WEB-INF/classes.

Now in Tomcat 4, they no longer work, even after re-compiling. Jsp's
can longer connect to the beans (classes). What's my problem? Yes I
noticed that all the simple jsp's did produced a .java and .class in
the jakarta-tomcat4.0/work, but all the jsp's using beans only
produced a .java not .class. Obviously, beans are "lost".

I also noticed there is a web.xml in each WEB-INF. Do I need to do
anything there for deployment?

You apparently need to read the Java servlet specification, and see what
it has to say about web.xml file. Also, Tomcat log files might contain
clues as to why things don't work.

Further, if you at the same point switched to a newer JDK version, it
could be that you're seeing tightening of some policies (or actually,
the policies are as they used to be, but newer JDKs implement them more
strictly) -- especially the rule that you can't import from the default
package, so it'd be best to place all your classes in a proper package
hierarchy.
 
W

wayne

Thanks.

Just for testing, if I used a scriptlet to code in jsp (to replace the
java bean), everything is fine with the same @import.

I also suspect the possible taglib change, since Tomcat 4's default
jsp is jsp1.2. I had mixed jsp1.1 and 1.2. (all work well if no beans
are used)

Does anyone here have experience in deployment of java classes in
Tomcat4 with jdk1.4? Can you share some shortcut way to do so?
Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top