I know about ServletBeans but you can (as far as i know) use them only on
Sun's JavaWebServer.
For example, a SimpleServletBean.java would look like:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class SimpleServletBean extends HttpServlet {
// In JavaWebServer there is a dialog where you can set this variable
private String name = "";
public void setName(String newName) {
if (newName!= null)
name = newName;
}
public String getName() {
return name;
}
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
doPost(req,res);
}
public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html><head><title>SimpleServletBean</title></head>");
out.println("<body><h1>Hello : "+ getName() +
"</h1></body></html>");
out.close();
}
}
-mw
> Can anybody tell me How to Create a Servlet Which is also a EJB. How to
> deploy such a Object?.
> Regards
> Satheesh naidu
>
___________________________________________________________________________
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