In web.xml i have nothing because when i call enterprise bean (session bean) from netbeans 5.5 i get an error in web.xml
I have ClientFacade and ClientFacadeLocal as session beans. Ignore the JSF stuff, as i added it but is not used. I am using Struts These are all my xml files: In main enterprise app i have: application.xml <?xml version="1.0" encoding="UTF-8"?> <application version="5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"> <display-name>TravelAgency</display-name> <web-uri>TravelAgency-war.war</web-uri> <context-root>/TravelAgency-war</context-root> TravelAgency-ejb.jar jboss-app.xml <?xml version="1.0" encoding="UTF-8"?> <jboss-app/> And in web client i have web.xml (ignore jsf tags they are not used) web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <context-param> <param-name>com.sun.faces.verifyObjects</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>com.sun.faces.validateXml</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.CONFIG_FILES</param-name> <param-value>/WEB-INF/faces-config.xml</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> <servlet-name>action</servlet-name><servlet-class>org.apache.struts.action.ActionServlet</servlet-class><init-param><param-name>config</param-name><param-value>/WEB-INF/struts-config.xml</param-value></init-param><init-param><param-name>debug</param-name><param-value>2</param-value></init-param><init-param><param-name>detail</param-name><param-value>2</param-value></init-param><load-on-startup>2</load-on-startup> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> <servlet-mapping><servlet-name>action</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <session-config><session-timeout> 30 </session-timeout></session-config><welcome-file-list> <welcome-file>loginForm.jsp</welcome-file> </welcome-file-list> </web-app> And in the webapp library i have the ejb jar. And the struts action /* * LoginAction.java * * Created on 23 May 2006, 07:59 */ package com.travelagency.struts; import Session.*; import entity.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForward; //import InitialContext JNDI to connect to EJB methods. import javax.naming.*; /** * * @author Other * @version */ public class LoginAction extends Action { /* forward name="success" path="" */ private final static String SUCCESS = "success"; private final static String CANCEL = "cancel"; /** * This is the action called from the Struts framework. * @param mapping The ActionMapping used to select this instance. * @param form The optional ActionForm bean for this request. * @param request The HTTP Request we are processing. * @param response The HTTP Response we are processing. * @throws java.lang.Exception * @return */ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { boolean b; String username = ((LoginActionForm) form).getUsername(); String password = ((LoginActionForm) form).getPassword(); //Call EJB InitialContext context = new InitialContext(); ClientFacadeLocal client = (ClientFacadeLocal)context.lookup("java:comp/env/ejb/ClientFacadeLocal"); b = client.VerifyUser(username, password); if (client.VerifyUser(username, password) == true) { return mapping.findForward(SUCCESS); } else return mapping.findForward(CANCEL); } } View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946010#3946010 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3946010 ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user