You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jose Roberto Torres <jo...@gmail.com> on 2006/08/28 20:44:11 UTC
Tomcat 5.0.28 is showing an old applets
Good day every one.
I am using the following:
*Linux Suse 10.1.
*Tomcat 5.0.28
*JDK 1.5
*MySql database
I am having problems making tomcat show the correct version of my
application. I am working with an applet that uses servlets to connect
to a MySql database. From the beginning I had no problems with it, but
two days ago the tomcat started to display an older version of the applet.
I am calling the applet like this "192.168.1.80/prime/servlets" to test
it and now is showing the correct applet only in the application server,
if i try to access the applet from another computer in the LAN it shows
a muuuuchh older version of the applet,
I have tried erasing my web browser cache, clearing the java classloader
cache (Thank you Antonio Petrelli) and i have erased all the .class
files and re-builded them to see if something changed.
I don´t know if Tomcat makes a copy of this files or if there is a way
to refresh the applets tomcat shows.
If there is anything else I am missing to make my problem clearer please
let me know.
Jose Roberto Torres Sanchez
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.0.28 is showing an old applets
Posted by Jose Roberto Torres <jo...@gmail.com>.
The problem is back, now not even cleaning up the complete project and
re-creating it from scratch is changing the old applet for the new.
Any one knows how to make tomcat how to refresh its classes? or how do i
make this behavior go away.
José Renato wrote:
> Actually I just do this sometimes when this behavior happens. In a
> production environment I believe that this is not necessary due the
> fact that once your program is deployed the version will not more
> change frequently. I don´t know what IDE are you using but I suggest
> you using ANT to make this sort of stuff automatically. Bye.
>
> Jose Roberto Torres escreveu:
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.0.28 is showing an old applets
Posted by José Renato <jo...@suntech.com.br>.
Actually I just do this sometimes when this behavior happens. In a
production environment I believe that this is not necessary due the fact
that once your program is deployed the version will not more change
frequently. I don´t know what IDE are you using but I suggest you using
ANT to make this sort of stuff automatically. Bye.
Jose Roberto Torres escreveu:
> Thnak you Renato that worked, I only have a final question, do I have
> to be doing this over and over so the final version stays?
> I am still in development and testing...
>
> Jose Roberto Torres
>
> José Renato wrote:
>> Hi, try cleaning the "work" directory. And after this make sure you
>> are really using the right application verion. Bye.
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.0.28 is showing an old applets
Posted by Jose Roberto Torres <jo...@gmail.com>.
Thnak you Renato that worked, I only have a final question, do I have to
be doing this over and over so the final version stays?
I am still in development and testing...
Jose Roberto Torres
José Renato wrote:
> Hi, try cleaning the "work" directory. And after this make sure you
> are really using the right application verion. Bye.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.0.28 is showing an old applets
Posted by José Renato <jo...@suntech.com.br>.
Hi, try cleaning the "work" directory. And after this make sure you are
really using the right application verion. Bye.
Jose Roberto Torres escreveu:
> Good day every one.
> I am using the following:
> *Linux Suse 10.1.
> *Tomcat 5.0.28
> *JDK 1.5
> *MySql database
>
> I am having problems making tomcat show the correct version of my
> application. I am working with an applet that uses servlets to connect
> to a MySql database. From the beginning I had no problems with it, but
> two days ago the tomcat started to display an older version of the
> applet.
> I am calling the applet like this "192.168.1.80/prime/servlets" to
> test it and now is showing the correct applet only in the application
> server, if i try to access the applet from another computer in the LAN
> it shows a muuuuchh older version of the applet,
> I have tried erasing my web browser cache, clearing the java
> classloader cache (Thank you Antonio Petrelli) and i have erased all
> the .class files and re-builded them to see if something changed.
>
> I don´t know if Tomcat makes a copy of this files or if there is a
> way to refresh the applets tomcat shows.
>
> If there is anything else I am missing to make my problem clearer
> please let me know.
>
> Jose Roberto Torres Sanchez
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.0.28 is showing an old applets
Posted by Stephan van Loendersloot <wh...@worldonline.nl>.
This solution will not work, probably it was Mansour's unintentional
typo. I think he meant to say:
<applet code="MyClass.class" archive="MyArchive.jar?=<?php print
date('U') ?>" width=xx height=xx>
This might work, haven't tried it myself, but I do know that does when
it comes to caching of images.
Anyway, I recognise the problem of the OP when I was still using classic
ASP or PHP (a long time ago ;-) ), but since this is a Java/JSP related
issue, the above solution may not make any sense to the people reading
this newsgroup.
The recommended way of including embedded objects, like JAR's or Flash
movies, has always been a pain because of the way different browsers
interpret these things (EMBED or OBJECT... etc..).
The JSP specification has a nice way of including JAR's (<jsp:plugin...
/>), which tries to determine how the requesting browser likes to
include an embedded object. However, you're not allowed to use variables
to specify the name of the JAR with this built-in function.
Nowadays, it even becomes harder because of the patent-violation that
Microsoft has with EOLAS, regarding the way-of-loading-plug-ins in
Internet Explorer. It requires a visitor to click on an embedded object
to active it before use.
Microsoft's preferred solution is to load the embedded object through
scripting, which indeed solves the problems of loading embedded object
in Internet Explorer
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp.
(Please note, that I do not endorse Microsoft in ANY way, the policy of
my company is that we make sure that our applications work and look the
same in IE (Windows), Firefox (Multi-platform), and Konqueror (Linux) at
least).
This still doesn't solve the solve the problem of the OP, but there are
ways to do this...
My solution back in the days of using Classic ASP or PHP was to generate
a JAR with the name it intended to have (i.e.
'C:\internet\www.mydomain.com\securedapplet.jar') in a directory which
wasn't accessible by the web browser. When the page that was responsible
for delivering the JAR to the browser was requested, that page would
create a unique random name for that JAR for that request, and copy the
original file to a directory accessible by the webserver (i.e.
'C:\internet\www.mydomain.com\www\applets\mysecuredapplet1234567.jar'
and serve that file, for each request. Of course, before each request,
it would *try* to delete every other file in that directory before the
copy. This worked, because if an existing
'C:\internet\www.mydomain.com\www\applets\uniquename'.jar that existed,
but was in use by another request by a random user could not be deleted,
so it was skipped but deleted the next time a request was made.
This also meant, that I didn't have to ask my clients to clear their
plug-in cache or browser-cache every time I made an update to the JAR.
Now, how do we create a solution for the problem of renaming the JAR
during the copy while still using it in the standard JSP solution?
I have a few solutions to this, though I'd rather see that the JSP
specification would allow for having variable EL expressions for the JAR
and other's in the <jsp:plugin... /> tag.
My solutions are something for tomorrow, or the day after, since it's my
birthday today and though I have two days off, I've been slightly
celebrating. These few glasses of wine make me become unstable.
I hope I didn't make it too confusing... the proposed solutions
shouldn't be too hard. Let me now if anyone's interested and I'll reply
to this list soon.
Kind regards,
Stephan van Loendersloot.
> I am new to JSP but this issue has nothing to do with tomcat as I have
> gone through this with apache. The browser keeps a version of the
> applet. I think you have to clear the java cache to fix this. However
> a work around, was to put the date and time after the javaclass. for
> example: <applet code="MyClass.class" archive="myJar.jar?v=theDate">
>
> I am not sure how to automate this in JSP, but that's what I did in
> PHP, and it works great.
>
> <applet code="MyClass.class" archive="MyClass.class?v=<?php print
> date('U') ?>" width=xx height=xx>
>
> This will force the browser to obtain the latest version of the code
> every time. Maybe you can find out how to do the same in JSP.
>
> I hope this helps.
>
>
>
>
>
> Jose Roberto Torres wrote:
>
>> Good day every one.
>> I am using the following:
>> *Linux Suse 10.1.
>> *Tomcat 5.0.28
>> *JDK 1.5
>> *MySql database
>>
>> I am having problems making tomcat show the correct version of my
>> application. I am working with an applet that uses servlets to
>> connect to a MySql database. From the beginning I had no problems
>> with it, but two days ago the tomcat started to display an older
>> version of the applet.
>> I am calling the applet like this "192.168.1.80/prime/servlets" to
>> test it and now is showing the correct applet only in the application
>> server, if i try to access the applet from another computer in the
>> LAN it shows a muuuuchh older version of the applet,
>> I have tried erasing my web browser cache, clearing the java
>> classloader cache (Thank you Antonio Petrelli) and i have erased all
>> the .class files and re-builded them to see if something changed.
>>
>> I don´t know if Tomcat makes a copy of this files or if there is a
>> way to refresh the applets tomcat shows.
>>
>> If there is anything else I am missing to make my problem clearer
>> please let me know.
>>
>> Jose Roberto Torres Sanchez
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.0.28 is showing an old applets
Posted by Mansour <ma...@ownmail.net>.
I am new to JSP but this issue has nothing to do with tomcat as I have
gone through this with apache. The browser keeps a version of the
applet. I think you have to clear the java cache to fix this. However a
work around, was to put the date and time after the javaclass. for
example: <applet code="MyClass.class" archive="myJar.jar?v=theDate">
I am not sure how to automate this in JSP, but that's what I did in PHP,
and it works great.
<applet code="MyClass.class" archive="MyClass.class?v=<?php print
date('U') ?>" width=xx height=xx>
This will force the browser to obtain the latest version of the code
every time. Maybe you can find out how to do the same in JSP.
I hope this helps.
Jose Roberto Torres wrote:
> Good day every one.
> I am using the following:
> *Linux Suse 10.1.
> *Tomcat 5.0.28
> *JDK 1.5
> *MySql database
>
> I am having problems making tomcat show the correct version of my
> application. I am working with an applet that uses servlets to connect
> to a MySql database. From the beginning I had no problems with it, but
> two days ago the tomcat started to display an older version of the
> applet.
> I am calling the applet like this "192.168.1.80/prime/servlets" to
> test it and now is showing the correct applet only in the application
> server, if i try to access the applet from another computer in the LAN
> it shows a muuuuchh older version of the applet,
> I have tried erasing my web browser cache, clearing the java
> classloader cache (Thank you Antonio Petrelli) and i have erased all
> the .class files and re-builded them to see if something changed.
>
> I don´t know if Tomcat makes a copy of this files or if there is a
> way to refresh the applets tomcat shows.
>
> If there is anything else I am missing to make my problem clearer
> please let me know.
>
> Jose Roberto Torres Sanchez
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org