Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Servlet and Web Start Blues

Thread view: 
JavaEnquirer - 18 Jan 2006 10:36 GMT
I have a servlet which dynamically generates a jnlp file. I'll simplify
my problem for the sake of brevity. A 3rd party system invokes a URL
http://localhost:8080/blah/blah.jnlp - this is "pointing" at a servlet
which sends back a dynamically generated jnlp and launches a java
client. This works great. However, there are some occasions when I do
not want to send a jnlp file back, instead, some server side processing
occurs. Again, this works fine except that I get a blank web browser
window appearing which is not welcome ( or JWS attempts to launch
nothing and fails ). Note: I cannot build logic into the 3rd party app.

So, how do I configure my servlet to "send nothing back" and ensure no
blank web page is displayed on the client machine, or no attempt to
launch JWS is made? What content type do I need to set and should I
push anything down the response stream?

Mank thanks in advance.
Joe Attardi - 18 Jan 2006 16:15 GMT
> So, how do I configure my servlet to "send nothing back" and ensure no
> blank web page is displayed on the client machine, or no attempt to
> launch JWS is made? What content type do I need to set and should I
> push anything down the response stream?

I'm not sure this is possible. Even if the received content is empty, I
think that the HTTP response will trigger a browser window. If it's not
a 200 OK, but some error code, it still has to show a window so the
browser can display the error.
JavaEnquirer - 18 Jan 2006 17:35 GMT
Thanks for your input.
Chris Uppal - 18 Jan 2006 17:50 GMT
> A 3rd party system invokes a URL
> http://localhost:8080/blah/blah.jnlp - this is "pointing" at a servlet
[quoted text clipped - 4 lines]
> window appearing which is not welcome ( or JWS attempts to launch
> nothing and fails ). Note: I cannot build logic into the 3rd party app.

I know almost nothing about JWS but seems to me that you have a situation where
the user will expect an application to start (because they did whatever they
normally do to start it), but you don't want that to happen.  That doesn't give
a very good UI.  One option is, instead of trying to return "nothing", you
could return a very small JWS application which just displayed a screen with an
explanatory message.

   -- chris
JavaEnquirer - 19 Jan 2006 10:52 GMT
> I know almost nothing about JWS but seems to me that you have a situation where
> the user will expect an application to start (because they did whatever they
> normally do to start it), but you don't want that to happen.  That doesn't give
> a very good UI.  One option is, instead of trying to return "nothing", you
> could return a very small JWS application which just displayed a screen with an
> explanatory message.

Sounds crazy I know, but the JWS application isn't invoked by the user,
its invoked by the 3rd party application - sometimes human intervention
is required, sometimes not. I've managed to solve the problem now using
the old mutually exclusive server socket binding trick.
Alun Harford - 18 Jan 2006 17:52 GMT
> I have a servlet which dynamically generates a jnlp file. I'll simplify
> my problem for the sake of brevity. A 3rd party system invokes a URL
[quoted text clipped - 10 lines]
> launch JWS is made? What content type do I need to set and should I
> push anything down the response stream?

I don't think you can. Well... you *can* (get the underlying socket and
close it) but I think that probably breaks the HTTP standard so browser
behavior is probably undefined (I'm guessing here).

Alun Harford


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.