Hello,
I'm trying to run a servlet with the server with the jsdk 2.1 server and I don't know where I have to put my HTML file and the servlet that it calls.
Can somebody tell me how can I run this servlet using this jsdk 2.1 server (without others web servers).
Thank's in advance.
I have this HTML page:
<html>
<head>
<title></title>
</head>
<body>
<form action=http://??????/Prova
method=POST>
<BR>
<BR>Introdueixi un text i premi "Acceptar"<BR>
<BR>
<input type=text name=TEXTO>
<BR>
<BR><input type=submit><input type=reset></form>
</body>
</html>
This page call this servlet named Prova:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;

public class Prova extends HttpServlet
{

  public void service(HttpServletRequest req, HttpServletResponse res)
              throws ServletException, IOException
  {
    PrintStream out = new PrintStream(res.getOutputStream());
    res.setContentType("text/html");
    String TEXTO    = req.getParameter("TEXTO");
    out.println("<p>Usted ha escrito : "+TEXTO+"</p>");
  }
 }

begin:vcard
n:Soler Rub�;Pere
tel;fax:+34 971 177 279
tel;work:+34 971 177 271
x-mozilla-html:FALSE
url:http://caib.es/ibit
org:Fundaci� IBIT.;Java Center
adr:;;C/Reverend Francesc Sitjar,1;Palma de Mallorca;Illes Balears;07010;Espanya
version:2.1
email;internet:[EMAIL PROTECTED]
title:T�cnic
fn:Pere Soler Rub�
end:vcard

Reply via email to