Urgent: jsp is not recompiled by Tomcat

E

Erwin Moller

Dear group,

Tomcat 4.1 stopped compiling jsp files I refresh.
If I overwrite them they are not recompiled, and thus I am stuck with my old
jsp's.
Restarting tomcat didn't solve this problem.

I have the following entry in web.xml

<Context path="/myapp" docBase="myapp" debug="0" reloadable="true"
crossContext="false" />

in in webapps the directory myapp exists, and is valid.
With valid I mean that Tomcat is succesfully serving the content.
It just refuses to recompile.

What could be causing this problem?
Thanks for your time!

Regards,
Erwin Moller
 
E

Erwin Moller

Hi


It is solved.
For people who get into the same situation, I think the following is the
reason and the solution.

In my case my FTP-program set the TIMESTAMP of the jsp file a few hours
EARLIER than the time on the server.
I guess Tomcat just looks for jsp-files that are younger than the
corresponding classfile.
Some in my case Tomcat didn't see any reason for recompiling because the
classfile was newer than the jsp-file.

When I used an editor on the remote machine, even if I just added a space,
the timestamp was set to the correct value, and concequently recompiled by
Tomcat. :)

*sigh*
But I am really glad this problem is over.

Thanks for reading, you may slap me with a trout if you want. :p

Regards,
Erwin Moller
 
J

jAnO!

"Erwin Moller"
Dear group,

Tomcat 4.1 stopped compiling jsp files I refresh.
If I overwrite them they are not recompiled, and thus I am stuck with my old
jsp's.
Restarting tomcat didn't solve this problem.

I have the following entry in web.xml

<Context path="/myapp" docBase="myapp" debug="0" reloadable="true"
crossContext="false" />

in in webapps the directory myapp exists, and is valid.
With valid I mean that Tomcat is succesfully serving the content.
It just refuses to recompile.

What could be causing this problem?
Thanks for your time!
perhaps it does recompile but runs into errors? check your logging.
 
E

Erwin Moller

jAnO! said:
"Erwin Moller"


perhaps it does recompile but runs into errors? check your logging.

No, I checked that. Couldn't find a thing in catalina.out or
localhost_logXXXX

But it is solved: timestamps.

Thanks for responding, Jano!

Regards,
Erwin Moller
 
S

Sudsy

Erwin said:
Hi


It is solved.
For people who get into the same situation, I think the following is the
reason and the solution.

In my case my FTP-program set the TIMESTAMP of the jsp file a few hours
EARLIER than the time on the server.
I guess Tomcat just looks for jsp-files that are younger than the
corresponding classfile.
Some in my case Tomcat didn't see any reason for recompiling because the
classfile was newer than the jsp-file.

Erwin,
Not to be pedantic, but this is a good argument for running ntp
(Network Time Protocol). You can have one server which is connected
to the 'net act as a client to a ntp server and then act as a server
to your other machines inside the firewall. This is a solution I
personally use and it works perfectly.
YMMV
 
E

Erwin Moller

Sudsy said:
Erwin,
Not to be pedantic, but this is a good argument for running ntp
(Network Time Protocol). You can have one server which is connected
to the 'net act as a client to a ntp server and then act as a server
to your other machines inside the firewall. This is a solution I
personally use and it works perfectly.
YMMV

Hi Sudsy,

You are not pedantic at all. I agree 100%.

The problem is new to me, and I didn't expect the timestamps to cause the
problem (did give it much tought untill now); I expected something was
broken inside Tomcat.
So I am glad it is just such a silly thing. Better than a broken Tomcat on a
productionserver. :)

I have already contacted my provider about this problem.
It is kind of annoying to retouch every uploaded file..

Thanks for your response.

Regards,
Erwin Moller
 
C

Chris Smith

Erwin said:
When I used an editor on the remote machine, even if I just added a space,
the timestamp was set to the correct value, and concequently recompiled by
Tomcat. :)

Assuming a UNIX-based system, the 'touch' command is an easier way to
update a timestamp on one or more files.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

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,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top