hi fhh..
i m using jboss IDE 1.6, jboss server 4.0.5 and its running...
HelloBean.java
package hello;
public interface HelloBean
{
public String hello ();
}
StatelessHelloBean.java
package hello;
import org.jboss.annotation.ejb.LocalBinding;
import javax.ejb.*;
@Stateless
public class StatelessHelloBean implements HelloBean {
public String hello () {
return "Hello World!";
}
}
hello.jsp
<%@ page import="hello.*, javax.naming.*, java.text.*"%>
<%!
private HelloBean hb = null;
public void jspInit () {
try {
InitialContext ctx = new InitialContext();
hb = (HelloBean) ctx.lookup(
"HelloWorld/StatelessHelloBean/local");
} catch (Exception e) {
e.printStackTrace ();
}
}
%>
<%
String result;
try {
result = hb.hello();
} catch (Exception e) {
result = e.getMessage();
}
%>
<%=result%>
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043168#4043168
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043168
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user