I changed the servlet :
| private void showUser(HttpServletRequest request,
| HttpServletResponse response) {
| try {
| InitialContext ctx = new InitialContext();
| userSession = (userSession)
ctx.lookup("userSessionBean/local");
| } catch (Exception e) {
| e.printStackTrace();
| }
|
| Collection<User> auser = userSession.getUsers();
| System.out.println(auser);
|
| if (auser != null)
| for (User user : auser) {
| System.out.println("User name : " +
user.getName());
| System.out.println("User id : " + user.getId());
| System.out.println("User mgs : " +
user.getMessage());
| }
| }
|
Error msg:
| 07:09:51,546 INFO [STDOUT] [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL
PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL
PROTECTED], [EMAIL PROTECTED]
| 07:09:51,546 ERROR [[ejb_servlet]] Servlet.service() for servlet
ejb_servlet threw exception
| java.lang.ClassCastException: ejb.persistence.User
| at servlet.ejb_servlet.showUser(ejb_servlet.java:53)
| at servlet.ejb_servlet.doGet(ejb_servlet.java:89)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3933887#3933887
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3933887
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user