tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cracauer, David D." <dcraca...@vue.com>
Subject RE: Auto load a servlet
Date Fri, 30 Nov 2001 18:25:41 GMT
If you just want the servlet run once when tomcat starts up, you could write
a small program that requests it, and call it from the startup script.

You could also write a java program that embeds tomcat, and request the
servlet from there.

Just off the top of my head....

-----Original Message-----
From: Bret Farris [mailto:developer@brefar.com]
Sent: Friday, November 30, 2001 12:19 PM
To: Tomcat Users List
Subject: Re: Auto load a servlet


Thanks for getting me to revisit that idea.  I had tried that before, but
couldn't get it to work.  The directory structure for our webapp wasn't
quite right.  I changed a few things around and can use a relative path
("../webstation/servlet/Webstation") now.  But I am still being requested,
by our marketing and developers, to see if we can have the servlet auto
load.

I think the redirect is sufficient, but am curious if there is a way to
autoload a servlet.

Thanks,
Bret


----- Original Message -----
From: "Cracauer, David D." <dcracauer@vue.com>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Friday, November 30, 2001 9:56
Subject: RE: Auto load a servlet


> Can't you do a redirect to a relative path?
> Like this:
>
> <html>
> <head>
>  <title>HTML REDIRECT</title>
>
>  <meta HTTP-EQUIV="REFRESH" CONTENT="3;
>  URL=/webstation/servlet/WebStation">
>  </head>
>
> </html>
>
> -----Original Message-----
> From: Bret Farris [mailto:developer@brefar.com]
> Sent: Friday, November 30, 2001 10:42 AM
> To: Tomcat Users List
> Subject: Re: Auto load a servlet
>
>
> Thanks for the response.  However, this is what I'm doing now.
> Unfortunately, using "localhost" in the redirected url does not work when
> the client browser is on another computer.  I can use the host computers
IP
> address instead, but defeats the purpose of what I'm trying to do, which
> I'll explain more.
>
> We make equipment that monitors clean rooms for companies, as well as the
> software that can monitor all the equipment at one time.  We have created
a
> servlet that will allow anyone in the company to monitor limited portions
of
> the software without having to install the software on lots of machines.
So
> we will be including Tomcat 4 with our software.  I don't want to have to
> create a customized index.html file for each customer.  So I'm searching
for
> a different solution.
>
> I'm researching using javascript to automatically find the IP address of
the
> hostcomputer and redirect to the IP+"webstation/servlet/WebStation".  But
> have come up empty on that front so far.
>
> Any other suggestions would be greatly appreciated.
>
> Thanks,
> Bret
>
> ----- Original Message -----
> From: "James Chuang" <james.chuang@home.com>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Thursday, November 29, 2001 15:04
> Subject: Re: Auto load a servlet
>
>
> > Create a real simple index.html, and have it do a onLoad like this...
> >
> > <HTML>
> > <SCRIPT language="JavaScript">
> > function redirect() {
> > window.location.href =
> "http://localhost:8080/webstation/servlet/WebStation"
> > }
> > </SCRIPT>
> > <BODY onLoad="redirect()" >
> > Redirecting ...
> > </BODY>
> > </HTML>
> >
> > Then setup your web server to serve up index.html by default.
> >
> >
> > ----- Original Message -----
> > From: "Bret Farris" <developer@brefar.com>
> > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> > Sent: Thursday, November 29, 2001 1:32 PM
> > Subject: Auto load a servlet
> >
> >
> > I have a servlet that can be loaded by going to
> > http://localhost:8080/webstation/servlet/WebStation
> > The servlet, WebStation.class, is in the directory:
> > webstation\WEB-INF\classes.  WebStation.class calls two other servlets,
> > BtmFrame.class and TopFrame.class, which in turn load and display in a
> > browser html files from the webstation directory.
> >
> > What I want to do is have the user enter http://localhost:8080 into
their
> > browser, and run the above servlet, as if they entered the link above.
Is
> > there a way to do this?  I have tried to use mapping with as many
> different
> > combinations as I can think of, but nothing has worked.
> >
> > Thanks,
> > Bret
> >
> >
> >
> > --
> > To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> >
> >
> >
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>
>
>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message