Hi Peter,
I am not sure about your email, but I suggest:
0
I use the following code to send a "custom class"
which includes some data of a game to applet
from servlet:
...
response.setContentType("application/octet-stream");
os=new ObjectOutputStream( response.getOutputStream() );
os.writeObject(data3_tmp);
os.flush();
...
1
I only test it in "pure IE5.0" and "pure Netscape4.7", :-)
I didn't ever test it in any browser with Java Plugin
1.2.x or 1.3(?). BTW, now I find it can work in
IE5.0+jsdk2.1 :-), I didn't meet the problem
of "//" again :-) , but I don't why :-) :-)
Bo
Sept. 22, 2000
Peter Pilgrim wrote:
> Hi
>
> Has anyone out there ever successfully coded applet/servlet combo that uses HTTP
> Tunnelling communication and works with the Java Plugin 1.3.
>
> FWIW HTTP Tunnelling is sending a Java Object package encoded through standard
> HTTP output stream. In other words writing an Java object to HTTPServletResponse
> e.g.
>
> void doPost( HttpServletRequest req, HttpServletResponse res)
> {
> res.setContentType("java-serialised/com.db.docserv.MenuItemNode" );
> ObjectOutputStream out = new ObjectOutputStream( res.getOutputStream );
>
> ...
>
> MenuItemNode node = new MenuItemNode( ... );
>
> ..
>
> out.write( node );
> out.flush();
> out.close();
> }
>
> If I know that it (HTTP Tunnelling) works? Then I can eliminate the fault being with
>Java
> Plugin and look at the `com.oreilly.servlet.HttpMessage' class?
>
> Last, when HTTP Tunnelling is used. Does the mime type in the servlet need to be
>specific value?
> What should it be ( `application/x-java-vm?' ) ?
> Or even `application/x-java-vm/java-applet' ,
>`application/com.db.docserv.MenuItemNode'
> rom Jason Hunter's book?
>
> Any help appreciated
> tia
> [EMAIL PROTECTED]
>
> In applet I get a `FileNotFoundException' . Why? This is my back trace again:
>
> askForRootTreeNode_Server()
>url:`http://poppy.dev.lon.deuba.com:9090/pilgpe/servlet/com.db.docserv.servlet.AdminServlet'
>
> java.io.FileNotFoundException:
>http://poppy.dev.lon.deuba.com:9090/pilgpe/servlet/com.db.docserv.servlet.AdminServlet?action=getrootnode
>
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
>
> at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown
>Source)
>
> at com.oreilly.servlet.HttpMessage.sendGetMessage(HttpMessage.java:77)
>
> at
>com.db.docserv.applet.AdminApplet.askForRootTreeNode_Server(AdminApplet.java:1095)
>
> at com.db.docserv.applet.AdminApplet.refreshTree(AdminApplet.java:1046)
>
> at
>com.db.docserv.applet.AdminApplet$RefreshAction.actionPerformed(AdminApplet.java:2509)
>
> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>
> at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
>Source)
>
> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
>
> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>
> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
>
> at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
>
> at java.awt.Component.processMouseEvent(Unknown Source)
>
> at java.awt.Component.processEvent(Unknown Source)
>
> at java.awt.Container.processEvent(Unknown Source)
>
> at java.awt.Component.dispatchEventImpl(Unknown Source)
>
> at java.awt.Container.dispatchEventImpl(Unknown Source)
>
> at java.awt.Component.dispatchEvent(Unknown Source)
>
> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
>
> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>
> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>
> at java.awt.Container.dispatchEventImpl(Unknown Source)
>
> at java.awt.Component.dispatchEvent(Unknown Source)
>
> at java.awt.EventQueue.dispatchEvent(Unknown Source)
>
> at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
>
> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>
> at java.awt.EventDispatchThread.run(Unknown Source)
>
> --
>
> Peter Pilgrim
> Welcome to the "Me Too" generation.
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you are not
>the intended recipient (or have received this e-mail in error) please notify the
>sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or
>distribution of the material in this e-mail is strictly forbidden.
>
> ___________________________________________________________________________
> 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