You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mihir Parekh <mi...@appliedcommerce.com> on 2001/02/25 19:17:59 UTC

job scheduler with struts

We need to implement a job scheduler (similar to unix cron job). Is
there a open source schedule which can be used with struts?  Any
pointers on implementing servlet based scheduler?

Thanks,
Mihir


form base authentication

Posted by Eric Wang <er...@cls.uob.com.sg>.
Hi,

I am trying to do a form base authentication using Weblogic 6.0 and Struts.

However, I got the following error.

<Feb 27, 2001 11:22:54 AM GMT+08:00> <Error> <HTTP> <[WebAppServletContext(82670
96,consumer)] exception raised on '/consumer/login.jsp'
javax.servlet.ServletException: runtime failure in custom tag 'form'
        at jsp_servlet._login._jspService(_login.java:241)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:208)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:244)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:1127)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:1529)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

Has anyone done that before? Or is there any articles that talks about it?

Thanks
Eric


Re: forwarding to different web pages

Posted by Anand Raman <an...@mymailbag.com>.
define seperate action mappings and depending on the login forward the
guy to the appropriate mapping..

if(user.isSysAdmin()) 
	return mapping.findForward("sysadmin");
else if(user.isAdmin())
	return mapping.findForward("admin");

Hope this helps
Anand Raman

On Mon, Feb 26, 2001 at 03:38:08PM +0800, Eric Wang wrote:
>I am new to Struts and pardon me if this question had been answered previously.
>
>Currently I am working on a login module. How can I forward the user to
>different pages after they had successful login.
>for example, system administrator route to one page. Normal user route to
>another page. Error route to another page.
>
>Thanks in advance.
>Eric

forwarding to different web pages

Posted by Eric Wang <er...@cls.uob.com.sg>.
I am new to Struts and pardon me if this question had been answered previously.

Currently I am working on a login module. How can I forward the user to
different pages after they had successful login.
for example, system administrator route to one page. Normal user route to
another page. Error route to another page.

Thanks in advance.
Eric


Re: job scheduler with struts

Posted by Wayne Ohm <wo...@home.com>.
Check out http://www.coolservlets.com/ and look for "maintenace package".  I hope
this is what you are looking for.

Mihir Parekh wrote:

> Yes ! I am looking for a generic code which can be packaged as part of
> servlet/jsp application.
>
> Mihir
>
> malcolm davis wrote:
>
> > I think Mihir was looking for generic code that would run on
> > any platform and be incorporated into the struts framework.
> > The NT scheduler (at) or Unix cron are both os specific solutions.
> >
> > Second, if wanted to call urls, you don't need perl, just use
> > the URL connection in Java.
> >
> >  >>-----Original Message-----
> >  >>From: Jim Richards [mailto:grumpy@cyber4.org]
> >  >>Sent: Sunday, February 25, 2001 3:44 PM
> >  >>To: struts-user@jakarta.apache.org
> >  >>Subject: Re: job scheduler with struts
> >  >>
> >  >>
> >  >>
> >  >>Depending on what you want to do, you could put your code into an
> >  >>action, fix it with a URL like
> >  >>
> >  >>     http://localhost/thingy.do
> >  >>
> >  >>and then run a job that calls the page. If you're on UNIX get the Perl
> >  >>module LWP, which installs command line scripts, one called GET
> >  >>which will call a URL for you, so then your script line in cron would be
> >  >>
> >  >>     GET http://localhost/thingy.do >> /tmp/thingy.log
> >  >>
> >  >>If you're on NT, although it should work I'm not sure. There is an
> >  >>implementation of "at" for NT in the NT resource kit. Otherwise you
> >  >>might have to look at other options.
> >  >>
> >  >>Just be aware if you do't secure the page, then anyone will be able to
> >  >>call it.
> >  >>
> >  >>Mihir Parekh wrote:
> >  >>>
> >  >>> We need to implement a job scheduler (similar to unix cron job). Is
> >  >>> there a open source schedule which can be used with struts?  Any
> >  >>> pointers on implementing servlet based scheduler?
> >  >>>
> >  >>> Thanks,
> >  >>> Mihir


Re: job scheduler with struts

Posted by Mihir Parekh <mi...@appliedcommerce.com>.
Yes ! I am looking for a generic code which can be packaged as part of
servlet/jsp application.

Mihir


malcolm davis wrote:

> I think Mihir was looking for generic code that would run on
> any platform and be incorporated into the struts framework.
> The NT scheduler (at) or Unix cron are both os specific solutions.
>
> Second, if wanted to call urls, you don't need perl, just use
> the URL connection in Java.
>
>  >>-----Original Message-----
>  >>From: Jim Richards [mailto:grumpy@cyber4.org]
>  >>Sent: Sunday, February 25, 2001 3:44 PM
>  >>To: struts-user@jakarta.apache.org
>  >>Subject: Re: job scheduler with struts
>  >>
>  >>
>  >>
>  >>Depending on what you want to do, you could put your code into an
>  >>action, fix it with a URL like
>  >>
>  >>     http://localhost/thingy.do
>  >>
>  >>and then run a job that calls the page. If you're on UNIX get the Perl
>  >>module LWP, which installs command line scripts, one called GET
>  >>which will call a URL for you, so then your script line in cron would be
>  >>
>  >>     GET http://localhost/thingy.do >> /tmp/thingy.log
>  >>
>  >>If you're on NT, although it should work I'm not sure. There is an
>  >>implementation of "at" for NT in the NT resource kit. Otherwise you
>  >>might have to look at other options.
>  >>
>  >>Just be aware if you do't secure the page, then anyone will be able to
>  >>call it.
>  >>
>  >>Mihir Parekh wrote:
>  >>>
>  >>> We need to implement a job scheduler (similar to unix cron job). Is
>  >>> there a open source schedule which can be used with struts?  Any
>  >>> pointers on implementing servlet based scheduler?
>  >>>
>  >>> Thanks,
>  >>> Mihir


RE: job scheduler with struts

Posted by malcolm davis <ma...@nuearth.com>.
I think Mihir was looking for generic code that would run on
any platform and be incorporated into the struts framework.  
The NT scheduler (at) or Unix cron are both os specific solutions.

Second, if wanted to call urls, you don't need perl, just use
the URL connection in Java.

 >>-----Original Message-----
 >>From: Jim Richards [mailto:grumpy@cyber4.org]
 >>Sent: Sunday, February 25, 2001 3:44 PM
 >>To: struts-user@jakarta.apache.org
 >>Subject: Re: job scheduler with struts
 >>
 >>
 >>
 >>Depending on what you want to do, you could put your code into an
 >>action, fix it with a URL like 
 >>
 >>	http://localhost/thingy.do
 >>
 >>and then run a job that calls the page. If you're on UNIX get the Perl
 >>module LWP, which installs command line scripts, one called GET
 >>which will call a URL for you, so then your script line in cron would be
 >>
 >>	GET http://localhost/thingy.do >> /tmp/thingy.log
 >>
 >>If you're on NT, although it should work I'm not sure. There is an
 >>implementation of "at" for NT in the NT resource kit. Otherwise you
 >>might have to look at other options.
 >>
 >>Just be aware if you do't secure the page, then anyone will be able to
 >>call it.
 >>
 >>Mihir Parekh wrote:
 >>> 
 >>> We need to implement a job scheduler (similar to unix cron job). Is
 >>> there a open source schedule which can be used with struts?  Any
 >>> pointers on implementing servlet based scheduler?
 >>> 
 >>> Thanks,
 >>> Mihir

Re: job scheduler with struts

Posted by Jim Richards <gr...@cyber4.org>.
Depending on what you want to do, you could put your code into an
action, fix it with a URL like 

	http://localhost/thingy.do

and then run a job that calls the page. If you're on UNIX get the Perl
module LWP, which installs command line scripts, one called GET
which will call a URL for you, so then your script line in cron would be

	GET http://localhost/thingy.do >> /tmp/thingy.log

If you're on NT, although it should work I'm not sure. There is an
implementation of "at" for NT in the NT resource kit. Otherwise you
might have to look at other options.

Just be aware if you do't secure the page, then anyone will be able to
call it.

Mihir Parekh wrote:
> 
> We need to implement a job scheduler (similar to unix cron job). Is
> there a open source schedule which can be used with struts?  Any
> pointers on implementing servlet based scheduler?
> 
> Thanks,
> Mihir

Re: job scheduler with struts

Posted by Robert Leland <Ro...@free2create.org>.
Turbine implements a job scheduler, I don't know
if they implemented it themself or integrated it
from another package. Perhaps this
is also one utility that could go in the proposed
code sharing library for Jakarta.

-Rob

Mihir Parekh wrote:
> 
> We need to implement a job scheduler (similar to unix cron job). Is
> there a open source schedule which can be used with struts?  Any
> pointers on implementing servlet based scheduler?
> 
> Thanks,
> Mihir

RE: job scheduler with struts

Posted by malcolm davis <ma...@nuearth.com>.
Will java.util.Timer work for you?
It was added in v1.3

 >>-----Original Message-----
 >>From: Mihir Parekh [mailto:mihir@appliedcommerce.com]
 >>Sent: Sunday, February 25, 2001 10:18 AM
 >>To: struts
 >>Subject: job scheduler with struts
 >>
 >>
 >>We need to implement a job scheduler (similar to unix cron job). Is
 >>there a open source schedule which can be used with struts?  Any
 >>pointers on implementing servlet based scheduler?
 >>
 >>Thanks,
 >>Mihir
 >>