Popup JFrames open on server not, but need to open through web browser.

In my application, Java code is called in by a JSP Page, running on a server.  Exceptions and Error popup boxes which should display through the users browser are opening on the server, and the actual user never gets to see them.  The java code runs blind most of the time, and only needs to display errors and exceptions when, or if they occur.

I need to enclose these Exceptions, and error popups and route them for display for the user through their browser.

I used swing classes ( Jframe, Jpanel, etc)  to build the popups, and they work very well, but only when the application runs locally.

Can you help suggest a way to make this happen?

Stuart
milspecsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

objectsCommented:
jsp pages are executed on the server so that would be expected.
You should instead be adding the appropriate html to the response to display the error to the user.
0
milspecsAuthor Commented:
I'm new to the idea of JSP pages... I have limited experience with them, I'm looking for a way to help reengineer the error and exception output from the java code, so that it can appear on the browser rather than at the server, and do not have a good handle on exactly how to do that.

Is there a simple example that can be passed my way that would open a new window, and display my current output?

--- Milspecs
0
objectsCommented:
perhaps use some javascript to popup an alert when the page loads.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

milspecsAuthor Commented:
I suppose... I'll look into using an alert, but had hoped to get some of the original look of the Exception and Error popups into the display.

Can an alert function like a wrapper of sorts?

Stuart...
0
objectsCommented:
>  but had hoped to get some of the original look of the Exception and Error popups into the display.

then you'll need to use an applet or something that provides the capability your require

> Can an alert function like a wrapper of sorts?

what do you mean?
0
milspecsAuthor Commented:
The Exception Frames for example  take parameters, and display exceptions in small windows with scroll bars, on a colored background, with explainiation text, etc.

If I could mimic this, and make it look similar to the existing codes, it would be easier for the existing users to understand, and would more closely match their documents.

How would I invoke an applet?

Can alert display a complex object, for example a whole frame and it's contents, can It simply wrap around an existing body of display code, or does it just do text?
0
objectsCommented:
http://java.sun.com/docs/books/tutorial/applet/index.html

not sure how practical an applet would be though, as the load time may mean the error popup appears a little after the page has completed loading.
0
milspecsAuthor Commented:
I must be completely out in left field, and not thinking about this right.....

If I am running code on the server, from a client machine somewhere else, is it even possible to open a second window on the client machine under program control, and fill it with anything.

is there some sort of replacement for the JFrame that is web sensitive, a "JWebFrame" as it were that performs the same sort of function as a JFrame, but instead of going directly to the local system, reaches out to where it can open a browser window.

--- Stuart
0
objectsCommented:
not without using an applet, and it will riun on the client not the server.
0
milspecsAuthor Commented:
This is obviously much more complicated than I thought...

Is it possible to have an applet the responds to commands given by application the server.  Could it for example take an object as a command/parameter, and perform some task.  I'm thinking that the way to do this could be to create an applet that listens, and dispatch it objects geared to perform specific funtions.  It would have to listen for requests, and perform the operations.

I had hoped for a simple wrapper that would just allow me to abstract the creating of a window across environments, since most do not require anything but simply to be displayed.

-- Stuart
0
objectsCommented:
the applet would need to connect to the server (using a Socket for example) to achieve that.
0
objectsCommented:
Personally I wouldn't recomend using an applet for this due to the load time involved.
The page will load first, followed by the applet which would not be clear to the user.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.