Tim, (I am so sorry ;). ) I am now getting a new error regarding class signatures (on a signed class) .. so I am hopeful that you are correct. I will keep you posted. But it seems that you think that this should work, which makes me hopeful.
Thanks so very much. Jackie At 01:24 PM 2/6/2003, you wrote: >> -----Original Message----- >> From: Jacqueline Spiegel - Cohen >> [mailto:[EMAIL PROTECTED]] >> Sent: Thursday, February 06, 2003 12:53 PM >> To: Tomcat Users List >> Subject: RE: REPOST Applet <-> | FIREWALL <-> Servlet (on Tomcat) >> >> >> Thanks Tom, > >Tim ;-) > >> >> jakarta-tomcat-3.3a >> >> I do not have a web.xml. Where should this file reside and >> what should it contain ? > >You need to have a web.xml inside your WEB-INF directory, which should >in turn be in your webapp root directory. > >This is where you need to declare your servlet, and map it to one or >more URL patterns. You should see the Servlet spec for more details. >Also check out the example webapps that come with Tomcat. > >-- >Tim Moore / Blackboard Inc. / Software Engineer >1899 L Street, NW / 5th Floor / Washington, DC 20036 >Phone 202-463-4860 ext. 258 / Fax 202-463-4863 > >> >> Thanks so very much for your assistance, it is genuinely appreciated. >> Jackie >> >> At 12:39 PM 2/6/2003, you wrote: >> >What version of Tomcat are you using? Can you post your web.xml? >> > >> >-- >> >Tim Moore / Blackboard Inc. / Software Engineer >> >1899 L Street, NW / 5th Floor / Washington, DC 20036 >> >Phone 202-463-4860 ext. 258 / Fax 202-463-4863 >> > >> > >> >> -----Original Message----- >> >> From: jackie [mailto:[EMAIL PROTECTED]] >> >> Sent: Thursday, February 06, 2003 12:36 PM >> >> To: [EMAIL PROTECTED] >> >> Cc: [EMAIL PROTECTED] >> >> Subject: REPOST Applet <-> | FIREWALL <-> Servlet (on Tomcat) >> >> >> >> >> >> Sorry : something happened when I sent my last email, >> >> removing all line breaks. >> >> Here is the real file, please ignore last : So sorry. >> >> >> >> Hi All, >> >> >> >> I have a LOCAL applet (with a LOCAL html page) that is trying to >> >> send an object to a servlet that is sitting on a REMOTE server. >> >> I need to pass an object between the two. >> >> >> >> * I have placed a hole in my firewall >> >> * my local applet is signed >> >> >> >> The servlet will not accept the object. >> >> I have not edited the web.xml file (since I do not know if it would >> >> help) >> >> I did edit my server.xml file in order to specify the http >> >> port (8888). >> >> >> >> The message on tomcat reads : >> >> Status code:404 request:R( + >> >> /signed/WEB-INF/classes/SERVLET_receiveSIMOBJ2.class + >> >> null) msg:null >> >> >> >> >> >> I know that local applets are not supposed to talk to servlets on >> >> different hosts, but I have also been told that with TCP, a >> >> firewall hole, >> >> and a signed applet, it should work. >> >> >> >> Can it ? >> >> >> >> Is there some way on Tomcat to get around this problem ? >> >> This code works either locally or remotely as long as the >> >> code is on the same machine. >> >> >> >> Thanks so very much in advance, it is genuinely appreciated. >> >> >> >> Here is some critical code : >> >> //==================== LOCAL APPLET >> >> String urlstr = >> >> "http://machine.cluster.net:8888/signed/servlet/SERVLET_receiv >> >> eSIMOBJ2"; >> >> // where machine.cluster.net is the server >> >> // 8888 is the port with the hole >> >> >> >> try { >> >> URL servletURL = new URL (urlstr); >> >> URLConnection uc = servletURL.openConnection(); >> >> uc.setDoOutput(true); >> >> uc.setDoInput(true); >> >> uc.setUseCaches(false); >> >> uc.setRequestProperty("Content-type", >> "application/octet-stream"); >> >> ObjectOutputStream objOut = >> >> new ObjectOutputStream >> >> (new GZIPOutputStream(uc.getOutputStream())); >> >> >> >> // sent it to the servlet >> >> System.out.println("APPLET: SENT TO SERVLET asldkfad" ); >> >> >> >> objOut.writeObject((Object)simobj); >> >> objOut.flush(); >> >> objOut.close(); >> >> System.out.println("APPLET : READING OBJECT BACK " ); >> >> >> >> ObjectInputStream objIn = >> >> new ObjectInputStream >> >> (new GZIPInputStream(uc.getInputStream())); >> >> // read an object from the servlet >> >> simobjout = (SIMDataOBj) objIn.readObject(); >> >> // ooo.junk = "JUNK"; >> >> System.out.println("Received info from Servlet " + >> >> simobjout.A + simobjout.B + simobjout.C + simobjout.D); >> >> >> >> objIn.close(); >> >> >> >> return simobjout; >> >> } >> >> //**************************************** END LOCAL APPLET >> >> >> >> >> >> //**************************************** REMOTE SERVLET >> >> public void doPost (HttpServletRequest request, >> >> HttpServletResponse response) { >> >> System.out.println("In Servlet's do post - reached "); // >> >> NEVER REACHED >> >> try { >> >> ObjectInputStream objIn = new ObjectInputStream >> >> (new GZIPInputStream(request.getInputStream())); >> >> >> >> // set up output stream >> >> >> >> response.setContentType("application/octet-stream"); >> >> ObjectOutputStream objOut = new ObjectOutputStream >> >> (new GZIPOutputStream(response.getOutputStream())); >> >> >> >> >> >> SIMDataOBj simobj = new SIMDataOBj(); >> >> simobj = (SIMDataOBj) objIn.readObject(); >> >> WriteXML (simobj); >> >> >> >> System.out.println("In Servlet ::: Printing the Object's >> >> contents " + simobj.A + simobj.B + simobj.C + simobj.D); >> >> simobj.A = "1 !!!!!!!!!!!! 1"; >> >> simobj.B = "2 !!!!!!!!!!!!!!!!!! 2"; >> >> simobj.C = "3 !!!!!!!!!!!!!!!!!!!! 3"; >> >> simobj.D = "4 !!!!!!!!!!!!!!!!!! 4"; >> >> objOut.writeObject((Object)simobj); >> >> objOut.close(); >> >> System.out.println("End Servlet Communication "); >> >> >> >> } >> >> >> >> //**************************************** END REMOTE Servlet >> >> //**************************************** both local >> >> and remote SIMDataObj >> >> class SIMDataOBj extends Object implements Serializable >> >> { >> >> >> >> String A, B, C, D; >> >> SIMDataOBj(){ >> >> A= new String ("THIS " ); >> >> B= new String (" IS " ); >> >> C= new String (" A " ); >> >> D= new String (" D " ); >> >> } >> >> >> >> } >> >> //**************************************** END both local >> >> and remote SIMDataObj >> >> ========================LOCAL HTML with signed applet >> >> ====================================== >> >> <HTML> >> >> >> >> <BODY> >> >> <APPLET CODE="AppletToServletSIMOBJ.class" >> >> ARCHIVE ="Stry.jar" >> >> WIDTH=430 HEIGHT=270 >> >> name=AppletToServletSIMOBJ >> >> ></APPLET> >> >> >> >> >> >> </BODY> >> >> >> >> </HTML> >> >> ========================END LOCAL HTML with signed applet >> >> ====================================== >> >> >> > >> >--------------------------------------------------------------------- >> >To unsubscribe, e-mail: [EMAIL PROTECTED] >> >For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
