|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
java.awt.HeadlessExceptionHi,
I created a Clear button with the following actions: textfield1.setText(""); textfield2.setText(""); I deployed the application on glassfish appserver on both window and solaris servers. I got an java.awt.HeadlessException from solaris server. I've already added -Djava.awt.headless=true to the JVM option and System.setProperty("java.awt.headless", "true") to the code, but I still get the error message. For windows server, no error message is display. The funny thing is if I entered a text in both fields, then reload the webpage and click Clear, then no error message is displayed. What did I do wrong? Or is this a bug in visual web? Thanks for any help! Regards, Johnny |
|
|
Re: java.awt.HeadlessExceptionHi,
You can check the HeadlessException javadoc. It says if the environment doesn't support keyboard, or display or mouse it is thrown (when one of those is attempted to be used), see: http://java.sun.com/javase/6/docs/api/java/awt/HeadlessException.html But to be sure the exception was not thrown by some other code (i.e. misused), please, send the exception stack trace. Thanks, -Peter tanww wrote: > Hi, > > I created a Clear button with the following actions: > > textfield1.setText(""); > textfield2.setText(""); > > I deployed the application on glassfish appserver on both window and > solaris servers. I got an java.awt.HeadlessException from solaris server. > I've already added -Djava.awt.headless=true to the JVM option and > System.setProperty("java.awt.headless", "true") to the code, but I still get > the error message. For windows server, no error message is display. > > The funny thing is if I entered a text in both fields, then reload the > webpage and click Clear, then no error message is displayed. What did I do > wrong? Or is this a bug in visual web? Thanks for any help! > > Regards, > > Johnny > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: java.awt.HeadlessExceptionHi Peter,
Thanks for the reply. For some reasons, I couldn't capture the exception stack trace. The AWTException message is display in the application message field which I used for field validation. There is no trace in the glassfish server log either. I did add throws and try-catch statements in the method which called from the button, but no help. Regards, Johnny
|
| Free Forum Powered by Nabble | Forum Help |