You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike Bremford <mi...@paperx.com> on 2000/10/06 16:07:13 UTC

RE: does tomcat 3.1 reload updated beans?

I'm pretty sure you do. From memory the reloadable flag only reloads
servlets that have changed - changing a been means bouncing the server.

Cheers... Mike

> -----Original Message-----
> From: matthew@hinge3.mistral.co.uk
> [mailto:matthew@hinge3.mistral.co.uk]On Behalf Of Matt Yee-King
> Sent: 06 October 2000 15:57
> To: tomcat-user@jakarta.apache.org
> Subject: does tomcat 3.1 reload updated beans?
>
>
> tomcat 3.1
>
> i'm using jakarta-tomcat to serve jsps. when i recompile an  updated
> bean class file it doesn't get reloaded. i have set the
> reloadable flag
> to true for that context path but it makes no odds. do i
> really have to
> restart the server every time i edit a bean??
>
> cheers
>
> matthew
>


Re: does tomcat 3.1 reload updated beans?

Posted by Matt Yee-King <ma...@liquidlight.co.uk>.
 thats a shame! GNUJSP does this smart reloading and its really handy
when developing - anyone know if there are plans to implement a
non-servlet class reloader?

matthew

Tom Lager wrote:
> 
> Yes you do.. tomcat only reloads servlet class files.  It
> does not also reload classes that the servlet class file
> uses.
> 
> -----Original Message-----
> From: Mike Bremford [mailto:mikeb@paperx.com]
> Sent: Friday, October 06, 2000 9:07 AM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: does tomcat 3.1 reload updated beans?
> 
> I'm pretty sure you do. From memory the reloadable flag only reloads
> servlets that have changed - changing a been means bouncing the server.
> 
> Cheers... Mike
> 
> > -----Original Message-----
> > From: matthew@hinge3.mistral.co.uk
> > [mailto:matthew@hinge3.mistral.co.uk]On Behalf Of Matt Yee-King
> > Sent: 06 October 2000 15:57
> > To: tomcat-user@jakarta.apache.org
> > Subject: does tomcat 3.1 reload updated beans?
> >
> >
> > tomcat 3.1
> >
> > i'm using jakarta-tomcat to serve jsps. when i recompile an  updated
> > bean class file it doesn't get reloaded. i have set the
> > reloadable flag
> > to true for that context path but it makes no odds. do i
> > really have to
> > restart the server every time i edit a bean??
> >
> > cheers
> >
> > matthew
> >

Re: Applet to Servlet: Has anyone done this yet?

Posted by Steve Parker <sc...@cisco.com>.
Thanks for the help.  It ended up that I was closing my debug file in my servlet and
then trying to write to it...oops.

Thanks again for all the help.


Matt Goss wrote:

> Steve,
> If your servlet is in the default package then you do not need a web.xml to
> reference it. Just place it in the
> "<tomcat-home>/webapps/YourContext/WEB-INF/classes" directory and then reference
> it via the URL: "http://yourdomain.com/YourContext/servlet/URLServlet". If you
> are already doing all that and it still doesn't work... ug... shoot your box ;)
> just kidding...
> check your install configuration... I can't really help you with that part... I
> didn't install our version, I just know how to use it...
> Matt Goss
>
> Steve Parker wrote:
>
> > Thanks for the reply.
> >
> > The URLServlet class is in the default package.  I'm trying to keep it as
> > simple as possible just to get it to run.
> >
> > Any other suggestions?  Do I need to add something to the conf/web.xml?  Do I
> > need a examples/Web-Inf/web.xml file?  If so, what needs to go into it?


Re: Applet to Servlet: Has anyone done this yet?

Posted by Matt Goss <mg...@rtci.com>.
Steve,
If your servlet is in the default package then you do not need a web.xml to
reference it. Just place it in the
"<tomcat-home>/webapps/YourContext/WEB-INF/classes" directory and then reference
it via the URL: "http://yourdomain.com/YourContext/servlet/URLServlet". If you
are already doing all that and it still doesn't work... ug... shoot your box ;)
just kidding...
check your install configuration... I can't really help you with that part... I
didn't install our version, I just know how to use it...
Matt Goss

Steve Parker wrote:

> Thanks for the reply.
>
> The URLServlet class is in the default package.  I'm trying to keep it as
> simple as possible just to get it to run.
>
> Any other suggestions?  Do I need to add something to the conf/web.xml?  Do I
> need a examples/Web-Inf/web.xml file?  If so, what needs to go into it?

Re: Applet to Servlet: Has anyone done this yet?

Posted by Steve Parker <sc...@cisco.com>.
Thanks for the reply.

The URLServlet class is in the default package.  I'm trying to keep it as
simple as possible just to get it to run.

Any other suggestions?  Do I need to add something to the conf/web.xml?  Do I
need a examples/Web-Inf/web.xml file?  If so, what needs to go into it?

Matt Goss wrote:

> Steve,
> is your Servlet located in the default package or a named one?
> If it is in another package, you will need to put a servlet mapping in the
> web.xml file like the following:
>  <servlet>
>   <servlet-name>myServlet</servlet-name>
>   <servlet-class>com.foo.myServlet</servlet-class>
>   <load-on-startup>0</load-on-startup> //0 means no 1 means yes
>   </servlet>
> Hope this helps,
> Matt Goss
>
> Steve Parker wrote:
>
> > I am trying to get an applet to communicate with a servlet using Tomcat
> > 3.2 beta 4 on a Windows NT 4.0 box.  I'm not using any redirect, just
> > trying to get it to work with only Tomcat at the moment.
> >
> > The URL I'm using is the following:
> >
> > http://scparker_nt_t8k:8080/examples/TestApplet.html
> >
> > My html and applet, TestApplet.html and TestApplet.class, are located in
> > the d:/tomcat/webapps/examples directory.  I am using the server.xml and
> > web.xml that came with the install.  In addition, I have deleted the
> > web.html file found in the d:/tomcat/webapps/examples/Web-Inf
> > directory.  I put my URLServlet.class file in the
> > d:/tomcat/webapps/examples/Web-Inf/classes directory.
> >
> > Inside of my TestApplet applet I try to connect to my servlet,
> > URLServlet and pass a string to the servlet.  The servlet should receive
> > the string, and prepend another string to it and return the new string.
> >
> > The code to create the URL is the following:
> >
> > URL url = new URL(getCodeBase(), "/servlet/URLServlet");  // with "/"
> > infront of servlet
> >
> > I print out the URL and get the following:
> >
> > http://scparker_nt_t8k:8080/examples//servlet/URLServlet
> >
> > And then I get the error message:
> >
> > IOException: java.io.FileNotFoundException:
> > scparker_nt_t8k:8080//servlet/URLServlet
> >
> > If I change the code to
> >
> > URL url = new URL(getCodeBase(), "servlet/URLServlet");  // no "/"
> > infront of servlet
> >
> > I print out the URL and get the following:
> >
> > http://scparker_nt_t8k:8080/examples/servlet/URLServlet
> >
> > And then I get the error message:
> >
> > IOException: java.io.FileNotFoundException:
> > scparker_nt_t8k:8080//examples/servlet/URLServlet
> >
> > Any help here would be greatly appreciated.
> >
> > Steve


Re: Applet to Servlet: Has anyone done this yet?

Posted by Matt Goss <mg...@rtci.com>.
Steve,
is your Servlet located in the default package or a named one?
If it is in another package, you will need to put a servlet mapping in the
web.xml file like the following:
 <servlet>
  <servlet-name>myServlet</servlet-name>
  <servlet-class>com.foo.myServlet</servlet-class>
  <load-on-startup>0</load-on-startup> //0 means no 1 means yes
  </servlet>
Hope this helps,
Matt Goss

Steve Parker wrote:

> I am trying to get an applet to communicate with a servlet using Tomcat
> 3.2 beta 4 on a Windows NT 4.0 box.  I'm not using any redirect, just
> trying to get it to work with only Tomcat at the moment.
>
> The URL I'm using is the following:
>
> http://scparker_nt_t8k:8080/examples/TestApplet.html
>
> My html and applet, TestApplet.html and TestApplet.class, are located in
> the d:/tomcat/webapps/examples directory.  I am using the server.xml and
> web.xml that came with the install.  In addition, I have deleted the
> web.html file found in the d:/tomcat/webapps/examples/Web-Inf
> directory.  I put my URLServlet.class file in the
> d:/tomcat/webapps/examples/Web-Inf/classes directory.
>
> Inside of my TestApplet applet I try to connect to my servlet,
> URLServlet and pass a string to the servlet.  The servlet should receive
> the string, and prepend another string to it and return the new string.
>
> The code to create the URL is the following:
>
> URL url = new URL(getCodeBase(), "/servlet/URLServlet");  // with "/"
> infront of servlet
>
> I print out the URL and get the following:
>
> http://scparker_nt_t8k:8080/examples//servlet/URLServlet
>
> And then I get the error message:
>
> IOException: java.io.FileNotFoundException:
> scparker_nt_t8k:8080//servlet/URLServlet
>
> If I change the code to
>
> URL url = new URL(getCodeBase(), "servlet/URLServlet");  // no "/"
> infront of servlet
>
> I print out the URL and get the following:
>
> http://scparker_nt_t8k:8080/examples/servlet/URLServlet
>
> And then I get the error message:
>
> IOException: java.io.FileNotFoundException:
> scparker_nt_t8k:8080//examples/servlet/URLServlet
>
> Any help here would be greatly appreciated.
>
> Steve

Applet to Servlet: Has anyone done this yet?

Posted by Steve Parker <sc...@cisco.com>.
I am trying to get an applet to communicate with a servlet using Tomcat
3.2 beta 4 on a Windows NT 4.0 box.  I'm not using any redirect, just
trying to get it to work with only Tomcat at the moment.

The URL I'm using is the following:

http://scparker_nt_t8k:8080/examples/TestApplet.html

My html and applet, TestApplet.html and TestApplet.class, are located in
the d:/tomcat/webapps/examples directory.  I am using the server.xml and
web.xml that came with the install.  In addition, I have deleted the
web.html file found in the d:/tomcat/webapps/examples/Web-Inf
directory.  I put my URLServlet.class file in the
d:/tomcat/webapps/examples/Web-Inf/classes directory.

Inside of my TestApplet applet I try to connect to my servlet,
URLServlet and pass a string to the servlet.  The servlet should receive
the string, and prepend another string to it and return the new string.

The code to create the URL is the following:

URL url = new URL(getCodeBase(), "/servlet/URLServlet");  // with "/"
infront of servlet

I print out the URL and get the following:

http://scparker_nt_t8k:8080/examples//servlet/URLServlet

And then I get the error message:

IOException: java.io.FileNotFoundException:
scparker_nt_t8k:8080//servlet/URLServlet

If I change the code to

URL url = new URL(getCodeBase(), "servlet/URLServlet");  // no "/"
infront of servlet

I print out the URL and get the following:

http://scparker_nt_t8k:8080/examples/servlet/URLServlet

And then I get the error message:

IOException: java.io.FileNotFoundException:
scparker_nt_t8k:8080//examples/servlet/URLServlet


Any help here would be greatly appreciated.

Steve



RE: does tomcat 3.1 reload updated beans?

Posted by Tom Lager <tl...@vc.fortdearborn.com>.
Good question.. I don't know :|

-----Original Message-----
From: William Brogden [mailto:wbrogden@bga.com]
Sent: Friday, October 06, 2000 9:30 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: does tomcat 3.1 reload updated beans?




Tom Lager wrote:
> 
> Yes you do.. tomcat only reloads servlet class files.  It
> does not also reload classes that the servlet class file
> uses.
> 

Could you use the servlet destroy method somehow to 
force unloading of the bean class?

WBB

Re: does tomcat 3.1 reload updated beans?

Posted by William Brogden <wb...@bga.com>.

Tom Lager wrote:
> 
> Yes you do.. tomcat only reloads servlet class files.  It
> does not also reload classes that the servlet class file
> uses.
> 

Could you use the servlet destroy method somehow to 
force unloading of the bean class?

WBB

RE: does tomcat 3.1 reload updated beans?

Posted by Tom Lager <tl...@vc.fortdearborn.com>.
Yes you do.. tomcat only reloads servlet class files.  It
does not also reload classes that the servlet class file
uses.

-----Original Message-----
From: Mike Bremford [mailto:mikeb@paperx.com]
Sent: Friday, October 06, 2000 9:07 AM
To: tomcat-user@jakarta.apache.org
Subject: RE: does tomcat 3.1 reload updated beans?


I'm pretty sure you do. From memory the reloadable flag only reloads
servlets that have changed - changing a been means bouncing the server.

Cheers... Mike

> -----Original Message-----
> From: matthew@hinge3.mistral.co.uk
> [mailto:matthew@hinge3.mistral.co.uk]On Behalf Of Matt Yee-King
> Sent: 06 October 2000 15:57
> To: tomcat-user@jakarta.apache.org
> Subject: does tomcat 3.1 reload updated beans?
>
>
> tomcat 3.1
>
> i'm using jakarta-tomcat to serve jsps. when i recompile an  updated
> bean class file it doesn't get reloaded. i have set the
> reloadable flag
> to true for that context path but it makes no odds. do i
> really have to
> restart the server every time i edit a bean??
>
> cheers
>
> matthew
>