From rkdecamp@mailbox.syr.edu Mon May 10 07:36 EDT 1999 Received: from syr.edu (syr.edu [128.230.1.49]) by postoffice.npac.syr.edu (8.9.3/8.9.3) with ESMTP id HAA19035 for ; Mon, 10 May 1999 07:36:58 -0400 (EDT) Received: from DeCampo.syr.edu (sudial0402-064.syr.edu [128.230.151.64]) by syr.edu (8.8.8/8.8.8) with SMTP id HAA23209 for ; Mon, 10 May 1999 07:36:57 -0400 (EDT) Message-Id: <199905101136.HAA23209@syr.edu> From: "Raymond DeCampo" To: Mehmet Sen Date: Mon, 10 May 1999 07:36:32 +0000 MIME-Version: 1.0 Content-transfer-encoding: 7BIT Subject: Re: Servlets Priority: normal In-reply-to: <199905100113.VAA06175@sultan.npac.syr.edu> References: from "Meryem Ispirli" at May 9, 99 08:41:46 pm Content-Type: text/plain; charset=US-ASCII Content-Length: 3573 Status: ROr Hello Mehmet, Here's the servlet code: // TestServlet.java import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.sql.*; import java.util.Vector; public class TestServlet extends HttpServlet { public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String reply = header + "Hello" + footer; resp.setContentLength(reply.length()); resp.setContentType("text/html"); PrintWriter toClient = resp.getWriter(); toClient.print(reply); toClient.close(); } private static String header = "\n\nGrader Response\n\n"; private static String footer = ""; } The HTML file is test.html located at http://class-server.npac.syr.edu:3768/cps616spring99-docs/cy99rkd/hw7/ Test/TestCourse/test.html and is:
I can't figure out why I can't get such a simple servlet to work. My servlet from project 2 is working fine. Thanks for the help, Ray > Hi, > > Send your code > mehmet > > > > > > Raymond, > > > > I'am not familiar with servlets. I'am forwarding your e-mail to Mehmet > > Sen. I don't believe I would be able to answer your question as I would be > > referring to existing example servlets. If you are also referring to them > > and are experiencing difficulties, Mehmet is the best person to help. > > > > I'am sorry that I can not answer your question. > > > > Mehmet Agbi, cc me in your e-mail. > > > > -Meryem. > > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > > " Meryem Ispirli Telephone Number: (315) 443-9182 " > > " Northeast Parallel Architectures Fax Number: (315) 443-1973 " > > " Center (NPAC), Syracuse University E-mail: mispirli@npac.syr.edu " > > " http://www.npac.syr.edu/users/mispirli/homepage/ " > > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > > > > On Sun, 9 May 1999, Raymond DeCampo wrote: > > > > > Meryem, > > > > > > I am having trouble getting a servlet to work. It seems to be some > > > kind of configuration error. My prior servlets work fine but I can't > > > get any new servlets to work. For example at > > > > > > http://class-server.npac.syr.edu:3768/cps616spring99-docs/cy99rkd/hw7/ > > > Test/TestCourse/test.html > > > > > > I have created a simple hello servlet but I can't get it to work. > > > Could you take a look and let me know if you see any problems? > > > Thanks, > > > Ray DeCampo > > > > > > > > > > > > > > > > > If you experience problems with the server, please e-mail > > > > cpsedu@npac.syr.edu > > > > > > > > Do not attempt to restart the server yourselves as we do not want you to > > > > stop the server. > > > > > > > > Thank you. > > > > > > > > -Meryem. > > > > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > > > > " Meryem Ispirli Telephone Number: (315) 443-9182 " > > > > " Northeast Parallel Architectures Fax Number: (315) 443-1973 " > > > > " Center (NPAC), Syracuse University E-mail: mispirli@npac.syr.edu " > > > > " http://www.npac.syr.edu/users/mispirli/homepage/ " > > > > """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >