Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ser To App java source code
#1

Code:
import java.io.*;
import javax.servlet.*;

abstract public class SerToApp extends GenericServlet
{

public void Service(ServletRequest req,ServletResponse res)
{
  try
  {
  String str = req.getParameter("userName");
  System.out.println("  " + str);
  ServletOutputStream sos = res.getOutputStream();
  res.setContentType("text/html");
  sos.println("<html><body>");
  sos.println("<h1><center>The value Retrieved from Applet is"
  + str + "</center></h2>");
  sos.println("</body></html>");
  }
  catch(Exception e)
  {
  System.out.println("  " + e.getMessage());
  }
}
}
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.