More answers, or at least some commentary:

> >Questions:
>
> Answers:
>
> >2) Is there an alternative to doing a res.SC_NO_CONTENT
> >so the the user can interact with the browser faster and the
> >checkbox gets clicked and appears as though a java thread
> >has been invoked?
>
> >That is, I want to click, click, click, click on the check boxes
> >and have servlets do there thing without hangin up the client
> >html front end.
>
> tricky...
>
As a *possibility*, if you have a client that you know has JavaScript, you
could use JS to fire off a few connections back to the Web server, and
invoke multiple Servlets; do a window.open("http://....") from within an
onclick() handler on each checkbox. This will, however, open multiple
windows on the user's desktop, but if that's the effect you want, that's
one way to do it. (Another, obviously, is to use an applet and open
multiple URLConnections on each checkbox-click.)

> This is not really a problem with servlets... it's a general web
> architecture thing. The web is designed around batch dispatch of
> interaction data (eg: forms) not live update (like you might have in
> an old client-server type app).
>
> It sounds to me like you should redesign your system to take heed of
> this.
>
Absolute agreement. Thin-client apps have to take a hit somewhere, and
where they take it is in client-side control. You *CANNOT* modify the
screen (aside from pretty graphical stuff with JS) except during a Web
request--that's the only time the Servlet system has control.

> >3) What is the best way to invoke servlets in the backround
> >and have the most interactive front end as possible?
>
Don't use servlets--use a thin class to create a URLClassLoader, load your
class via an HTTP URL, and run a full-fledged Java client on the client
side. Most of the time, "interactive front-end" means "No Thin Client".

> This is really not how servlets are used. But you could use an applet
> on the web page to talk to a servlet (or any other kind of server type
> thing, eg: CORBA) and that would give you a little more
> flexibility....
>
And, as suggested above, you *may* be able to use some JavaScript (or
VBScript, or whatever client-side script your users' browsers support) to
do some of this without having to download an applet.

> But as I say, usually when people ask these questions (IMHO) it's
> because they've got the design wrong, change the design to fit in with
> web architecture and everything gets better.
>
Yep. Understand the forces, then choose the right solution that fits your
problem in its given context.

Ted Neward
http://www.javageeks.com/~tneward

___________________________________________________________________________
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

Reply via email to