It is certainly possible to use the servlet interfaces in order to
allow automated execution using this method. This seems a little "hacky"
to me though. Could open up secutity problems too.
I would suggest that the best place for this type of functionality
is either in the database since it is a database function, or using a
standalone java application & some scheduler, like cron.
For the first situation, look into whether or not your database
supports triggers and events. Makes things like this easier. If you opt
for the second, which can be much more straight forward if you're not a DB
jockey, look into which functions are common in you code and abstract them
into a parent class. This should allow you to avoid copying too much
code.
Eric
On Sun, 14 Nov 1999, Craig R. McClanahan wrote:
> Lalith Jayaweera wrote:
>
> > Hi,
> >
> > thanks for Ur reply, But I couldn't understand what U mentioned, Could U please
> > explain it bit more.
> >
> > Consider that major part of my project is done using servlets, and this is the
> > part am having prolems,If it is a application as U mentioned How can I
> > communicate with the servlets which have been writen earlier.
> >
>
> If all of your logic is embedded in servlets, and you just want to call one of
> them, a stand-alone application can fit the need pretty nicely. Consider the
> following thoughts:
>
> * The stand alone application can pretend to be a browser
> by using the URLConnection class to issue a request to your
> servlet's URI. The servlet doesn't have to know that it was
> called from a program instead of by a user.
>
> * See the networking trail in the Java Language Tutorial
> (http://java.sun.com/docs/books/tutorial) for example code
> using this class.
>
> * To schedule when this application is called, look at using the
> scheduling facilities already provided by your operating system,
> if any -- such as "cron" on Unix-based systems. Don't bother
> to write system-level software like this if it already exists.
>
> Craig McClanahan
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html