hi all,
I have succesfully deployed my enterprise application on jboss-3.2.2.
It consists of an session bean which is accessed using a
Servlet.
The servlet is in a seperate .war file and the
ejb's in a .jar file.
However when I call the servlet which inturn calls the session bean.
I get the following error--
------------------------------------------------------
HTTP Status 405 - HTTP method GET is not supported by this URL
--------------------------------------------------------
the corrresponding servlet code is as follows
package beans;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.rmi.*;
import javax.rmi.*;
import java.util.*;
import javax.naming.*;
import javax.ejb.*;
public class ClientServlet1 extends HttpServlet
{
public void doPost(HttpServletResponse res,HttpServletRequest req)
throws ServletException,IOException
{
doGet(res,req);
}
public void doGet(HttpServletResponse res,HttpServletRequest req)
throws ServletException,IOException{
try {
res.setContentType("text/html");
PrintWriter out=res.getWriter();
Context ctx = new InitialContext();
Object obj=ctx.lookup("java:comp/env/ejb/beans/SimpleBean");
SimpleHome home =
(SimpleHome)PortableRemoteObject.narrow(obj,SimpleHome.class);
Simple
test = home.create();
if (test != null)
out.println("<br>Completed creation of remote EJBObject");
else
out.println("Create returned null");
String s = test.getMessage();
out.println(" EJB Message: " + s);
out.close();
}catch(Exception e){System.out.println("exception is"+e);}
}
}
-----------------------------------------------------------------------
I m not able to figure put where the error lies n what it is supposed to mean???
Any help will be greatly appreciated.
thnx