You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by hezjing <he...@gmail.com> on 2007/08/24 08:45:26 UTC

Refresh JSP in Tomcat 5.5

Hi!

Yes, this is about the refresh or recompile of JSP in Tomcat 5.5 again :-(

I have modified the title of index.jsp in Tomcat 5.5\webapps\myapp.

Then, I deleted Tomcat 5.5\work\Catalina\localhost\myapp directory.

Unfortunately when I accessed myapp from IE, it is still showing the
old title of index.jsp.

When I checked, the Tomcat
5.5\work\Catalina\localhost\X2\org\apache\jsp\index_jsp.java is
showing the old title.

In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
and that the context's reloadable=true.

Well, I tried few methods from Google and still getting the same
problem (and there are many though). Of course, restart the Tomcat
will solve this problem :-)

Do we have a clean and elegant way of solving this problem?


Did I miss out anything here?


-- 

Hez

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by Brian Munroe <br...@gmail.com>.
On 8/27/07, hezjing <he...@gmail.com> wrote:
> I started to believe that this may not be Tomcat's problem.
>
> It is showing the latest JSP after I I took out all the configuration
> and libraries of Struts, Hibernate, Log4j and etc.
>
> I will post my question to the other mailing list, and I appreciate your help!

Good luck, I am glad you were able to isolate the problem further.  I
run the configuration on three different architectures (Solaris, OS X,
and XP), it works fine everywhere and I was out of ideas!   :)

-- brian

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by hezjing <he...@gmail.com>.
I started to believe that this may not be Tomcat's problem.

It is showing the latest JSP after I I took out all the configuration
and libraries of Struts, Hibernate, Log4j and etc.

I will post my question to the other mailing list, and I appreciate your help!

Thank you!


On 8/27/07, Brian Munroe <br...@gmail.com> wrote:
> BTW, with the configuration I showed below, the JSP does not get
> translated to a *.java file until I first access the page.
>
> On 8/26/07, Brian Munroe <br...@gmail.com> wrote:
> > On 8/26/07, hezjing <he...@gmail.com> wrote:
> > > Hi!
> > >
> > > If I understood the comment in web.xml correctly, by default, the
> > > JspServlet is initialized with the following parameters
> > >
> > > development=true
> > > modificationTestInterval=4
> > >
> > > Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated?
> >
> > That is the way I read the comments too.  What if you change
> > modificationTestInterval back to 0?
> >
> > I have the following configuration (in the JSP Servlet element) and
> > changes to my JSPs are picked up immediately:
> >
> >         <init-param>
> >             <param-name>development</param-name>
> >             <param-value>true</param-value>
> >         </init-param>
> >         <init-param>
> >             <param-name>modificationTestInterval</param-name>
> >             <param-value>1</param-value>
> >         </init-param>
> >         <init-param>
> >             <param-name>checkInterval</param-name>
> >             <param-value>1</param-value>
> >         </init-param>
> >
> > Also, you are restarting the container after each web.xml modification, right :)
> >
> > -- brian
> >
>
> ---------------------------------------------------------------------
> 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
>
>


-- 

Hez

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by Brian Munroe <br...@gmail.com>.
BTW, with the configuration I showed below, the JSP does not get
translated to a *.java file until I first access the page.

On 8/26/07, Brian Munroe <br...@gmail.com> wrote:
> On 8/26/07, hezjing <he...@gmail.com> wrote:
> > Hi!
> >
> > If I understood the comment in web.xml correctly, by default, the
> > JspServlet is initialized with the following parameters
> >
> > development=true
> > modificationTestInterval=4
> >
> > Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated?
>
> That is the way I read the comments too.  What if you change
> modificationTestInterval back to 0?
>
> I have the following configuration (in the JSP Servlet element) and
> changes to my JSPs are picked up immediately:
>
>         <init-param>
>             <param-name>development</param-name>
>             <param-value>true</param-value>
>         </init-param>
>         <init-param>
>             <param-name>modificationTestInterval</param-name>
>             <param-value>1</param-value>
>         </init-param>
>         <init-param>
>             <param-name>checkInterval</param-name>
>             <param-value>1</param-value>
>         </init-param>
>
> Also, you are restarting the container after each web.xml modification, right :)
>
> -- brian
>

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by Brian Munroe <br...@gmail.com>.
On 8/26/07, hezjing <he...@gmail.com> wrote:
> Hi!
>
> If I understood the comment in web.xml correctly, by default, the
> JspServlet is initialized with the following parameters
>
> development=true
> modificationTestInterval=4
>
> Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated?

That is the way I read the comments too.  What if you change
modificationTestInterval back to 0?

I have the following configuration (in the JSP Servlet element) and
changes to my JSPs are picked up immediately:

        <init-param>
            <param-name>development</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>modificationTestInterval</param-name>
            <param-value>1</param-value>
        </init-param>
        <init-param>
            <param-name>checkInterval</param-name>
            <param-value>1</param-value>
        </init-param>

Also, you are restarting the container after each web.xml modification, right :)

-- brian

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by hezjing <he...@gmail.com>.
Hi!

If I understood the comment in web.xml correctly, by default, the
JspServlet is initialized with the following parameters

development=true
modificationTestInterval=4

Aren't this sufficient to reload the JSP after 4 seconds the JSP is updated?



On 8/27/07, hezjing <he...@gmail.com> wrote:
> Hi!
>
> Setting reloading=true does not solve the problem :-(
>
> Here are the steps I performed,
>
> 1) Reinstalled Tomcat 5.5.23 on Windows XP
> 2) Added the following parameters to JspServlet in Tomcat 5.5\conf\web.xml
> development=false
> reloading=true
> checkInterval=3
> 3) Started Tomcat service
> 4) Deployed myapp for first time
> 5) Accessed myapp from IE
> 6) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
> 7) Accessed myapp from IE after 3 seconds and it is still showing the old title!
>
> The Tomcat 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java
> is still showing the old title.
>
> BTW, the "reloading" parameter is not listed as one of the supporting
> parameters in the comment of web.xml (?).
>
> Do you have any other idea of what could be the problem?
>
>
> On 8/24/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hezjing,
> >
> > hezjing wrote:
> > > In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
> > > and that the context's reloadable=true.
> >
> > Maybe try 'reloading="true"' instead?
> >
> > http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
> >
> > - -chris
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
> > 6WyJhi9YQsTVkcR+MqFnp2A=
> > =017s
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
>
> --
>
> Hez
>


-- 

Hez

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by hezjing <he...@gmail.com>.
Hi Tim

I do not have Firefox on my computer.

Yes, I did do a hard-refreshing and this is what I tried,

1) Closed IE6.
2) From IE6, deleted all offline content and cookies.
3) Accessed myapp from IE6 and it is still showing the old title!

......


On 8/27/07, Tim Lee <ti...@koorong.com.au> wrote:
> I might be completely off course, but...
>
> Does the title stay the same (as in your IE case) when you use Firefox as well?
> If it changes in Firefox, it might be a problem of IE browser caching problem.
> Have you tried hard-refreshing, or closing the browser and opening again?
>
>
> Timothy Wonil Lee
>
> Java Developer
> Koorong Books (http://www.koorong.com/)
>
> http://www.google.com/reader/shared/16849249410805339619
> http://timundergod.blogspot.com
>
> -----Original Message-----
> From: hezjing [mailto:hezjing@gmail.com]
> Sent: Monday, 27 August 2007 1:59 PM
> To: Tomcat Users List
> Subject: Re: Refresh JSP in Tomcat 5.5
>
> Hi!
>
> Setting reloading=true does not solve the problem :-(
>
> Here are the steps I performed,
>
> 1) Reinstalled Tomcat 5.5.23 on Windows XP
> 2) Added the following parameters to JspServlet in Tomcat 5.5\conf\web.xml
> development=false
> reloading=true
> checkInterval=3
> 3) Started Tomcat service
> 4) Deployed myapp for first time
> 5) Accessed myapp from IE
> 6) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
> 7) Accessed myapp from IE after 3 seconds and it is still showing the old title!
>
> The Tomcat 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java
> is still showing the old title.
>
> BTW, the "reloading" parameter is not listed as one of the supporting
> parameters in the comment of web.xml (?).
>
> Do you have any other idea of what could be the problem?
>
>
> On 8/24/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hezjing,
> >
> > hezjing wrote:
> > > In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
> > > and that the context's reloadable=true.
> >
> > Maybe try 'reloading="true"' instead?
> >
> > http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
> >
> > - -chris
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.7 (MingW32)
> > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >
> > iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
> > 6WyJhi9YQsTVkcR+MqFnp2A=
> > =017s
> > -----END PGP SIGNATURE-----
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
>
> --
>
> Hez
>
> ---------------------------------------------------------------------
> 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
>
>
> !DSPAM:46d24c4c35371427112096!
>
>
> ---------------------------------------------------------------------
> 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
>
>


-- 

Hez

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by Tim Lee <ti...@koorong.com.au>.
I might be completely off course, but...

Does the title stay the same (as in your IE case) when you use Firefox as well?
If it changes in Firefox, it might be a problem of IE browser caching problem.
Have you tried hard-refreshing, or closing the browser and opening again?


Timothy Wonil Lee

Java Developer
Koorong Books (http://www.koorong.com/)

http://www.google.com/reader/shared/16849249410805339619
http://timundergod.blogspot.com

-----Original Message-----
From: hezjing [mailto:hezjing@gmail.com] 
Sent: Monday, 27 August 2007 1:59 PM
To: Tomcat Users List
Subject: Re: Refresh JSP in Tomcat 5.5

Hi!

Setting reloading=true does not solve the problem :-(

Here are the steps I performed,

1) Reinstalled Tomcat 5.5.23 on Windows XP
2) Added the following parameters to JspServlet in Tomcat 5.5\conf\web.xml
development=false
reloading=true
checkInterval=3
3) Started Tomcat service
4) Deployed myapp for first time
5) Accessed myapp from IE
6) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
7) Accessed myapp from IE after 3 seconds and it is still showing the old title!

The Tomcat 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java
is still showing the old title.

BTW, the "reloading" parameter is not listed as one of the supporting
parameters in the comment of web.xml (?).

Do you have any other idea of what could be the problem?


On 8/24/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hezjing,
>
> hezjing wrote:
> > In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
> > and that the context's reloadable=true.
>
> Maybe try 'reloading="true"' instead?
>
> http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
> 6WyJhi9YQsTVkcR+MqFnp2A=
> =017s
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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
>
>


-- 

Hez

---------------------------------------------------------------------
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


!DSPAM:46d24c4c35371427112096!


---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by hezjing <he...@gmail.com>.
Hi!

Setting reloading=true does not solve the problem :-(

Here are the steps I performed,

1) Reinstalled Tomcat 5.5.23 on Windows XP
2) Added the following parameters to JspServlet in Tomcat 5.5\conf\web.xml
development=false
reloading=true
checkInterval=3
3) Started Tomcat service
4) Deployed myapp for first time
5) Accessed myapp from IE
6) Modified the title of Tomcat 5.5\webapps\myapp\index.jsp
7) Accessed myapp from IE after 3 seconds and it is still showing the old title!

The Tomcat 5.5\work\Catalina\localhost\myapp\org\apache\jsp\index_jsp.java
is still showing the old title.

BTW, the "reloading" parameter is not listed as one of the supporting
parameters in the comment of web.xml (?).

Do you have any other idea of what could be the problem?


On 8/24/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hezjing,
>
> hezjing wrote:
> > In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
> > and that the context's reloadable=true.
>
> Maybe try 'reloading="true"' instead?
>
> http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
> 6WyJhi9YQsTVkcR+MqFnp2A=
> =017s
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> 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
>
>


-- 

Hez

---------------------------------------------------------------------
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: Refresh JSP in Tomcat 5.5

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hezjing,

hezjing wrote:
> In Tomcat 5.5\conf\web.xml, I have defined modificationTestInterval=0
> and that the context's reloadable=true.

Maybe try 'reloading="true"' instead?

http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGztUh9CaO5/Lv0PARAlA2AKCc1wDd4K8YJlDU8RKImvPhZYX5KwCeI+Hb
6WyJhi9YQsTVkcR+MqFnp2A=
=017s
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
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