Meaningless Drivel is fun!
The moose likes JSP and the fly likes JSP and Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP and Swing" Watch "JSP and Swing" New topic

JSP and Swing

Dishpal Bhaluja
Ranch Hand

Joined: Dec 30, 2007
Posts: 96
I have a JSP page and I am calling a Swing Application from that page.
I guess the page will be shown at the server side only. and when deployed wont be shown in client side
But how can I make it run on the client side?

A good interface for the test environment was what I was looking for.

Any ideas.Using Struts 1.2

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Serve up an applet. Applets can run Swing.

An IDE is no substitute for an Intelligent Developer.
Dishpal Bhaluja
Ranch Hand

Joined: Dec 30, 2007
Posts: 96
Guess thats unsafe.But how can I do this.

Can I create a jar file and use JNLP,Webstart to start the swing application from my JSP.

What I currently did is like,

I set my parameters in my action class,and forwards to a jsp page.This jsp page then calls a Swing class
and the windows get initiated.

Now I came to understand that it runs on the server and not in client

So i need a work around

So i have these three GUI related java files in my whole web application.

So now I have two ways ,

1. creating a JAR file out of these three ,[But I am passing parametes to these classes from my JSP.]
and create a JNLP and then use webstart to start the application.I dont know how to do these.
These I collected through googling.

2.Or using the applet method.

Can you shed some light on these issues.
I agree. Here's the link:
subject: JSP and Swing
jQuery in Action, 3rd edition