You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Denise Mangano <De...@complusdata.com> on 2003/01/11 21:34:56 UTC

Basic questions

Hey all :)

Throughout my learning experience with Tomcat, I have gotten curious about
the following things.  This is mostly just for informational purposes.
Inquiring minds want to know ; ) 

#1:  Is it possible to set Tomcat to restart (as user tomcat) on a schedule?


#2:  Is there anyway to set something up that if a user attempts to access
my app within a specific time frame they are redirected to a different page.
For example, when my user accesses my webapp they go to
www.myhost.com/mywebapp and they are brought to index.jsp page.  However, if
the same exact URL is accessed within a specific time frame, they would be
brought to index2.jsp.

Thanks!

Denise

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Basic questions

Posted by Paul Yunusov <py...@rogers.com>.
On Saturday 11 January 2003 03:34 pm, Denise Mangano wrote:
> Hey all :)
>
> Throughout my learning experience with Tomcat, I have gotten curious about
> the following things.  This is mostly just for informational purposes.
> Inquiring minds want to know ; )
>
> #1:  Is it possible to set Tomcat to restart (as user tomcat) on a
> schedule?
>
>
> #2:  Is there anyway to set something up that if a user attempts to access
> my app within a specific time frame they are redirected to a different
> page. For example, when my user accesses my webapp they go to
> www.myhost.com/mywebapp and they are brought to index.jsp page.  However,
> if the same exact URL is accessed within a specific time frame, they would
> be brought to index2.jsp.
>
> Thanks!
>
> Denise

Hi,

#1: It's OS-specific, and you can do it in a few ways, from writing a shell 
script to developing a native application. If you use UNIX, try man crond at 
the prompt.

#2: Have a Controller servlet that will forward (RequestDispatcher comes to 
mind) to different JSPs based on any criteria including time. Ah, the 
advantages of Model 2...

Paul

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Basic questions

Posted by Paul Yunusov <py...@rogers.com>.
On Saturday 11 January 2003 04:55 pm, Steve R Burrus wrote:
> Denise, can you figure out why this servlet doesn't seem to work for me at
> all. It's called the GreetingServlet.java

I am not Denise but I thought I'd throw something on the table. Change your 
web.xml as shown below. You got your servlet-mapping element wrong before. 
After that just make sure GreetingServlet.class is in webapps/<whatever your 
webapp name is>/WEB-INF/classes and you're ready to go 
(http://localhost:8080/<your webapp name goes here>/MyOwnServlet should work 
then).

<web-app>
  <servlet>
    <!-- Servlet alias -->
    <servlet-name>greeting</servlet-name> 

    <!-- Fully qualified Servlet class -->
    <servlet-class>GreetingServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>greeting</servlet-name>
    <url-pattern>/MyOwnServlet</url-pattern>
  </servlet-mapping>

</web-app>

Paul

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Basic questions

Posted by Steve R Burrus <bu...@yahoo.com>.
 Denise, can you figure out why this servlet doesn't seem to work for me at all.
It's called the GreetingServlet.java

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com