You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Florian G. Haas" <fl...@hico.com> on 2003/06/25 12:19:31 UTC
Tomcat 4.1.18 won't reload deleted and re-created JSP pages, returns 404 error though JSP is there
Hello,
forgive my intrusion, it's usually not my style to start posting to a list I haven't previously lurked on for a while. This issue baffles me, though, and I haven't been able to find any information to even give me the feeling of heading in the right direction.
Using Tomcat 4.1.18 on a Red Hat Linux 7.2 box with JDK 1.3.1_06, JSP pages on the system are created and deleted automagically by a CMS. When the CMS deletes a previously published JSP, attempting to access that document of course results in a 404 error. Re-publishing the same document, however, doesn't change the situation at all; Tomcat still issues the 404 even though the JSP is again there. Jasper never seems to pick up the JSP; the .java and .class files in the work folder are never updated. The only current way of being able to access the file again is to restart Tomcat.
The default Jasper settings in the global web.xml are unchanged, the "development" init-param is set to true. The webapp's Context has reloadable="true", its Host has autoDeploy="true" and liveDeploy="true". The file is owned by the Tomcat user and has a mode of 0664.
The problem applies regardless of whether the document is accessed through a Tomcat standalone connector or via Apache and mod_jk2.
Any clues will be greatly appreciated.
Thanks very much in advance,
Florian
--
Florian G. Haas
hico .:. Informations- und Kommunikations- Management Ges.m.b.H.
TechLab .:. Thomas A. Edison Str. 2
A-7000 Eisenstadt .:. Austria
Phone: +43 (2682) 704 6141
Cellular: +43 (664) 410 2703
Fax: +43 (2682) 704 6110
florian.haas@hico.com
www.hico.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Mike Hulse <mh...@rmcisdc3.rmc.com>.
Thanks, but for some reason, due to some unknown wisdom at corporate
headquarters,
they have blocked that url.
----- Original Message -----
From: "Jason Bainbridge" <ja...@jblinux.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, June 25, 2003 8:02 AM
Subject: Re: Logging the correct time
> On Wed, 25 Jun 2003 19:39, Mike Hulse wrote:
> > I was afraid someone would ask what platform. :) I am using an IBM
AS400.
> > The universal time offset is -4:00 hours. Which is EDT. Apache is
> > recording time in its logs correctly. Tomcat 4.1.24 stand-alone logs
are
> > the only place that
> > that the time is not correct.
>
> See this new post for some tips on how to fix the problem:
>
> http://tinyurl.com/f7s0
>
> --
> Jason Bainbridge
> http://jblinux.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Jason Bainbridge <ja...@jblinux.org>.
On Wed, 25 Jun 2003 19:39, Mike Hulse wrote:
> I was afraid someone would ask what platform. :) I am using an IBM AS400.
> The universal time offset is -4:00 hours. Which is EDT. Apache is
> recording time in its logs correctly. Tomcat 4.1.24 stand-alone logs are
> the only place that
> that the time is not correct.
See this new post for some tips on how to fix the problem:
http://tinyurl.com/f7s0
--
Jason Bainbridge
http://jblinux.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Mike Hulse <mh...@rmcisdc3.rmc.com>.
Well that did the trick. There was tons of information generated by that
jsp.
The system thought "user.timezone=CENTRAL", so I added user.timezone
to a SystemDefault.properties file and set it to EST. Everything is fine
now
and it is adjusted to daylight time.
Thanks,
Mike
----- Original Message -----
From: "Tim Funk" <fu...@joedog.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, June 25, 2003 8:00 AM
Subject: Re: Logging the correct time
> Doh! IIRC, the AS400 reads different properties files to load system
> properties. Also - what happens with this jsp:
> <%
> for(java.util.Enumeration e =
> System.getProperties().propertyNames();e.hasMoreElements() ;){
> Object x = e.nextElement();
> out.println(x + "=" + System.getProperty(x.toString()));
> }
> %>
>
> See if a System property user.timezone is filled in or the AS400 JVM might
> use a different one.
>
> -Tim
>
> Mike Hulse wrote:
> > I was afraid someone would ask what platform. :) I am using an IBM
AS400.
> > The universal time offset is -4:00 hours. Which is EDT. Apache is
recording
> > time in its logs correctly. Tomcat 4.1.24 stand-alone logs are the only
> > place that
> > that the time is not correct.
> >
> > ----- Original Message -----
> > From: "Jason Bainbridge" <ja...@jblinux.org>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Wednesday, June 25, 2003 7:18 AM
> > Subject: Re: Logging the correct time
> >
> >
> >
> >>On Wed, 25 Jun 2003 19:04, Mike Hulse wrote:
> >>
> >>>Hi,
> >>>
> >>>Where do I set/adjust the time that is recorded in the log files?
> >>>Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
> >>>and it looks like everything is CDT (Central European Daylight time).
> >>
> >>Are you using Windows 2000 with SP3 installed by any chance? MS does
some
> >>funny business with the installation of SP3 that stuffs up the timezone
> >>settings for the JRE. Try changing to a different timezone in windows,
> >
> > then
> >
> >>switch back to the correct one and restart Tomcat.
> >>
> >>If you are using a different environment please post details.
> >>
> >>Regards,
> >>--
> >>Jason Bainbridge
> >>http://jblinux.org
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Tim Funk <fu...@joedog.org>.
Doh! IIRC, the AS400 reads different properties files to load system
properties. Also - what happens with this jsp:
<%
for(java.util.Enumeration e =
System.getProperties().propertyNames();e.hasMoreElements() ;){
Object x = e.nextElement();
out.println(x + "=" + System.getProperty(x.toString()));
}
%>
See if a System property user.timezone is filled in or the AS400 JVM might
use a different one.
-Tim
Mike Hulse wrote:
> I was afraid someone would ask what platform. :) I am using an IBM AS400.
> The universal time offset is -4:00 hours. Which is EDT. Apache is recording
> time in its logs correctly. Tomcat 4.1.24 stand-alone logs are the only
> place that
> that the time is not correct.
>
> ----- Original Message -----
> From: "Jason Bainbridge" <ja...@jblinux.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, June 25, 2003 7:18 AM
> Subject: Re: Logging the correct time
>
>
>
>>On Wed, 25 Jun 2003 19:04, Mike Hulse wrote:
>>
>>>Hi,
>>>
>>>Where do I set/adjust the time that is recorded in the log files?
>>>Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
>>>and it looks like everything is CDT (Central European Daylight time).
>>
>>Are you using Windows 2000 with SP3 installed by any chance? MS does some
>>funny business with the installation of SP3 that stuffs up the timezone
>>settings for the JRE. Try changing to a different timezone in windows,
>
> then
>
>>switch back to the correct one and restart Tomcat.
>>
>>If you are using a different environment please post details.
>>
>>Regards,
>>--
>>Jason Bainbridge
>>http://jblinux.org
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Mike Hulse <mh...@rmcisdc3.rmc.com>.
I was afraid someone would ask what platform. :) I am using an IBM AS400.
The universal time offset is -4:00 hours. Which is EDT. Apache is recording
time in its logs correctly. Tomcat 4.1.24 stand-alone logs are the only
place that
that the time is not correct.
----- Original Message -----
From: "Jason Bainbridge" <ja...@jblinux.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, June 25, 2003 7:18 AM
Subject: Re: Logging the correct time
> On Wed, 25 Jun 2003 19:04, Mike Hulse wrote:
> > Hi,
> >
> > Where do I set/adjust the time that is recorded in the log files?
> > Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
> > and it looks like everything is CDT (Central European Daylight time).
>
> Are you using Windows 2000 with SP3 installed by any chance? MS does some
> funny business with the installation of SP3 that stuffs up the timezone
> settings for the JRE. Try changing to a different timezone in windows,
then
> switch back to the correct one and restart Tomcat.
>
> If you are using a different environment please post details.
>
> Regards,
> --
> Jason Bainbridge
> http://jblinux.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Jason Bainbridge <ja...@jblinux.org>.
On Wed, 25 Jun 2003 19:04, Mike Hulse wrote:
> Hi,
>
> Where do I set/adjust the time that is recorded in the log files?
> Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
> and it looks like everything is CDT (Central European Daylight time).
Are you using Windows 2000 with SP3 installed by any chance? MS does some
funny business with the installation of SP3 that stuffs up the timezone
settings for the JRE. Try changing to a different timezone in windows, then
switch back to the correct one and restart Tomcat.
If you are using a different environment please post details.
Regards,
--
Jason Bainbridge
http://jblinux.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Mike Hulse <mh...@rmcisdc3.rmc.com>.
Sorry about the blank post.
All times in Apache and the server are correct. Only Tomcat 4.1.24
stand-alone are not.
----- Original Message -----
From: "Mike Hulse" <mh...@rmcisdc3.rmc.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, June 25, 2003 7:40 AM
Subject: Re: Logging the correct time
>
> ----- Original Message -----
> From: "Tim Funk" <fu...@joedog.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, June 25, 2003 7:32 AM
> Subject: Re: Logging the correct time
>
>
> > Which component? In the meantime check the following:
> > - The computer's OS time
> > - The computer's OS timezone
> > - Is GMT time actually being logged instead?
> > - Are wacky JVM args being passed to tomcat to trick it into thinking
your
> in
> > a different timezone?
> > - If on unix - Before startup of tomcat -is the useris setting
environment
> > variables which affect timezone?
> >
> > -Tim
> >
> >
> > Mike Hulse wrote:
> > > Hi,
> > >
> > > Where do I set/adjust the time that is recorded in the log files?
> > > Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
> > > and it looks like everything is CDT (Central European Daylight time).
> > >
> > > Thanks,
> > > Mike
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Mike Hulse <mh...@rmcisdc3.rmc.com>.
----- Original Message -----
From: "Tim Funk" <fu...@joedog.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, June 25, 2003 7:32 AM
Subject: Re: Logging the correct time
> Which component? In the meantime check the following:
> - The computer's OS time
> - The computer's OS timezone
> - Is GMT time actually being logged instead?
> - Are wacky JVM args being passed to tomcat to trick it into thinking your
in
> a different timezone?
> - If on unix - Before startup of tomcat -is the useris setting environment
> variables which affect timezone?
>
> -Tim
>
>
> Mike Hulse wrote:
> > Hi,
> >
> > Where do I set/adjust the time that is recorded in the log files?
> > Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
> > and it looks like everything is CDT (Central European Daylight time).
> >
> > Thanks,
> > Mike
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Logging the correct time
Posted by Tim Funk <fu...@joedog.org>.
Which component? In the meantime check the following:
- The computer's OS time
- The computer's OS timezone
- Is GMT time actually being logged instead?
- Are wacky JVM args being passed to tomcat to trick it into thinking your in
a different timezone?
- If on unix - Before startup of tomcat -is the useris setting environment
variables which affect timezone?
-Tim
Mike Hulse wrote:
> Hi,
>
> Where do I set/adjust the time that is recorded in the log files?
> Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
> and it looks like everything is CDT (Central European Daylight time).
>
> Thanks,
> Mike
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Logging the correct time
Posted by Mike Hulse <mh...@rmcisdc3.rmc.com>.
Hi,
Where do I set/adjust the time that is recorded in the log files?
Everything is 6 hours off. I am in EDT (USA Eastern Daylight time)
and it looks like everything is CDT (Central European Daylight time).
Thanks,
Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
refering files in other directory from one webapps
Posted by Lee Peik Feng <pf...@syabas.com>.
Hi,
I have set a webapp like below:
<Context path="/music" docBase="C:/My Music" debug="0"/>
I have mp3 files in C:/My Music and I can reach the mp3 files like this:
http://<ip>:8080/music/test.mp3
and browser will play the song (with Win Media Player)
is it posible that I use same webapps http://<ip>:8080/music/
and play mp3 files in other directory?
I have written a JSP that stream the mp3 files as below and it works,
but is it possible that Tomcat can refer to the mp3 files in other
directory directly?
or any other ways?
<%
String filename = "C:\\my.mp3";
File file = new File(filename);
ReadableByteChannel rbc = Channels.newChannel(new FileInputStream(file));
WritableByteChannel wbc = Channels.newChannel(response.getOutputStream());
response.setContentType("audio/mpeg");
response.setContentLength((int)file.length());
response.setHeader("Content-Disposition", "attachment;
filename="+filename.substring(filename.lastIndexOf(File.separator)+1)+";");
ByteBuffer bb = ByteBuffer.allocateDirect(1024);
while (rbc.read(bb) != -1)
{
bb.flip();
wbc.write(bb);
bb.clear();
}
wbc.close();
rbc.close();
%>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
RE: Tomcat 4.1.18 won't reload deleted and re-created JSP pages, returns 404 error though JSP is there
Posted by "Paul (BRI)" <ph...@briconsultingroup.com>.
Florian, Just as a side note, I know I have to constantly delete out the
/work/Standalone/localhost/xxx directory and start/stop tomcat
(4.1.18/RedHat 7.2) to see my new pages. If I add a new JSP, delete the
/work/Standalone/localhost/xxx, and then don't restart, I get a 404
error. If I don't delete those files I of course see the old page - I
also have my settings to development. I am using Tomcat as a standalone.
So I would also be interested in others experience with this. Paul
-----Original Message-----
From: Florian G. Haas [mailto:florian.haas@hico.com]
Sent: Wednesday, June 25, 2003 5:20 AM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat 4.1.18 won't reload deleted and re-created JSP pages,
returns 404 error though JSP is there
Hello,
forgive my intrusion, it's usually not my style to start posting to a
list I haven't previously lurked on for a while. This issue baffles me,
though, and I haven't been able to find any information to even give me
the feeling of heading in the right direction.
Using Tomcat 4.1.18 on a Red Hat Linux 7.2 box with JDK 1.3.1_06, JSP
pages on the system are created and deleted automagically by a CMS. When
the CMS deletes a previously published JSP, attempting to access that
document of course results in a 404 error. Re-publishing the same
document, however, doesn't change the situation at all; Tomcat still
issues the 404 even though the JSP is again there. Jasper never seems to
pick up the JSP; the .java and .class files in the work folder are never
updated. The only current way of being able to access the file again is
to restart Tomcat.
The default Jasper settings in the global web.xml are unchanged, the
"development" init-param is set to true. The webapp's Context has
reloadable="true", its Host has autoDeploy="true" and liveDeploy="true".
The file is owned by the Tomcat user and has a mode of 0664.
The problem applies regardless of whether the document is accessed
through a Tomcat standalone connector or via Apache and mod_jk2.
Any clues will be greatly appreciated.
Thanks very much in advance,
Florian
--
Florian G. Haas
hico .:. Informations- und Kommunikations- Management Ges.m.b.H. TechLab
.:. Thomas A. Edison Str. 2 A-7000 Eisenstadt .:. Austria
Phone: +43 (2682) 704 6141
Cellular: +43 (664) 410 2703
Fax: +43 (2682) 704 6110
florian.haas@hico.com
www.hico.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org