Hey all,
We seem to be missing the point here !!! Aaaargh !
The way I look at it is,
The servlet is a Java Application, with full access to the JVM (well at least on most
servlet containers perhaps, I use Visual Age's Websphere Test Environment).
So then the servlet execution reaches this point, it pops up a JOptionPane, on the
server, and if someone is seated there, he /she enters some input.
The servlet then takes this return value, and send it to the browser.
I'm just about to try this, and will post back soon.
Regards,
Sriram
5/19/01 11:15:39 PM, Michael Weller <[EMAIL PROTECTED]> wrote:
>With which webserver did you try it? I tried with JRun & Tomcat & jo
>(tagtraum.com) and all requests timed out. I have the JavaPlugIn and Sun's
>latest JVM running on Win 2000. What might be the problem?
>
>Thanks in advance.
>
>-mw
>
>At 22:19 19.05.2001 +0200, you wrote:
>>Surprising ! It works (well, after fixing a small error in the fourth
>>line;-)
>>Can you tell us where you found information about this ?
>>
>>Pierre-Yves
>>
>>-----Message d'origine-----
>>De : A mailing list for discussion about Sun Microsystem's Java Servlet
>>API Technology. [mailto:[EMAIL PROTECTED]]De la part de
>>Simon Chia
>>Envoy� : vendredi 18 mai 2001 14:29
>>� : [EMAIL PROTECTED]
>>Objet : Re: Servlet with Swing
>>
>>
>>i'm not saying that we need cool UI, i'm just supprize that servlet a server
>>side programming can do such thing. without the help of applets
>>here the code
>>
>>import java.io.*;
>>import javax.servlet.*;
>>import javax.servlet.http.*;
>>import javax.swing.JOptionPane.*;
>>
>>public class SomeServlet extends HttpServlet {
>> public void doGet(HttpServletRequest request,
>> HttpServletResponse response)
>> throws ServletException, IOException {
>> PrintWriter out = response.getWriter();
>>
>> String display;
>>
>> display = JOptionPane.showInputDialog("enter name");
>> out.println("bla bla bla " +display );
>>
>> }
>>}
>>
>>
>>
>>
>>
>>----- Original Message -----
>>From: "Sriram Narayanan" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Friday, May 18, 2001 4:30 PM
>>Subject: Re: Servlet with Swing
>>
>>
>> > If you want to display "cool"User interfaces on the browser side, then use
>>Swing in applets. And since you insist on communicating with a servlet,
>>communicate
>> > using URLConnection.
>> >
>> > Really, servlets are intended for server side work, and can be used as
>>such only, and not for cool UI's like you have been saying for the past few
>>days.
>> >
>> > Sriram
>> >
>> > >Simon Chia wrote:
>> > >
>> > >> no no ... u can give it a try ur self.. i'm talking about servlets..
>>not
>> > >> applets, u can give it a try...
>> > >> once the page loads, it loads the swing files also. u can use swing to
>>get
>> > >> user input and display it out on the screen.. u can even use to verify
>> > >> username and password(something which i havent try).. its a world of
>>wonder
>> > >> u can try with swing and servlets.
>> > >
>> >
>> >
>> >
>> >
>> > _________________________________________________________
>> > Do You Yahoo!?
>> > Get your free @yahoo.com address at http://mail.yahoo.com
>> >
>> >
>>___________________________________________________________________________
>> > 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
>> >
>>
>>___________________________________________________________________________
>>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
>>
>>___________________________________________________________________________
>>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
>
>___________________________________________________________________________
>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
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
___________________________________________________________________________
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