A browser makes a request and your servlet provides a response. While processing the request you would have to communicate with your app or write to the database or whatever.
Embedding the server would mean you don't have to communicate from the server to your app, but if you're just reading and writing flat files, you wouldn't need to communicate anyway.
I'd suggest using JSP rather than servlets, for the convenience of not having to compile classes or set up servlet mappings, but that's up to you.
PS. Google is your friend :)
On 8/3/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:
Hi
I wish to write a web interface to an embedded java application (TINI).
I have never used servlets before and want to know if they will be the
right tools for the job.
The application should service different hardware interrupts; whenever
it receives data from one of its peripherals, it should search a local
onboard "database" (2 ordered flat files) for the data packet and
depending on the findings in the database, give different digital
outputs, connect to a PC and update a log file. The most recent logs
should be viewable on a web page. Also, the data in the "database"
should be updateable from the web interface. I.e. 2 reasons for the web
interface: 1. updating data, 2. showing whats happening (newest lines
of log file).
As far as I can tell there are 2 alternatives:
1. embed a http server inside the .tini java application. The source
code for a partially implemented web server is avaialable.
2. Use servlets (together with a proprietary web server).
If I use servlets, where whould the "main event loop" of the
application be? As I thought about the app. originally, a post fronm
the web page to update the DB would be just a different "interrupt" to
service. Can I implement this in/as a servlet?
All help or links to relevant documentation appreciated.
Chavoux
