hello everyone
I am new to
java and studying
Servlets. I started installing BEA Weblogic plateform 8.1. I installed it and configured it. But the first thing i do not know the CLASSPATH to be set?
Second please tell be the post installation steps for this BEA Weblogic 8.1?
As i was trying the program below:
import java.io.*;
import javax.servlet.*;
public class Servlet1 implements Servlet
{
ServletConfig config = null;
public void init(ServletConfig config)
{
this.config = config;
System.out.println("init() called");
}
public void service(ServletRequest req, ServletResponse res) throws IOException, ServletException
{
System.out.println("Service() called");
String us = req.getParameter("user");
String pass = req.getParameter("pass");
res.setContentType("text/html");
PrintWriter pw = res.getWriter();
pw.println("You entered:\n <h1>UserName: "+us+"</h1>");
pw.println("You entered:\n <h1>Password: "+pass+"</h1>");
pw.close();
}
public void destroy()
{
System.out.println("destroy() called");
}
public String getServletInfo()
{
return null;
}
public ServletConfig getServletConfig()
{
return config;
}
}
i made web.xml and Html file as .
But i got this error while executing .java file above
ERROR: Main method was not found in Servlet1....
please help