Hi,
Please have a look at the following code -
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class ServletNameDemo extends HttpServlet {
String name;
ServletConfig s;
public void init(ServletConfig sc) throws ServletException {
super.init(sc);
// s = sc;
}
public void doGet(HttpServletRequest req, HttpServletResponse
res) throws IOException {
name = getServletName();
// name = s.getServletName();
// name = getServletConfig().getServletName();
res.setContentType("text/html");
System.out.println("<HTML><BODY> name is " + name + "
</BODY></HTML>");
}
}
I get a 500 HTTP Server Internal Error stating -
'reported this exception: javax.servlet.ServletConfig: method
getServletName()Ljava/lang/String; not found'.
Iam using JSDK 2.2 and Java Web Server 2.0.
I tried all the commented options also but in vain. Please help me
figure out wheres the problem.
TIA,
Inder
--
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html