I have followed instructions from http://zetcode.com/java/ejb/ to create a simple web app. It runs fine with eclipse, where it uses Glassfish server 4.1. To deploy to Tomcat, I simply copied the war file produced to the webapps folder of Tomcat 9. Tomecat 9 extracted the war file fine, and the HTML files work fine, but anything related to Java servlets fail, as shown below.
            Asked
            
        
        
            Active
            
        
            Viewed 115 times
        
    0
            
            
        - 
                    What is line 32 in Greet.java? – Ori Marko May 24 '18 at 09:04
 - 
                    3Tomcat does not have an EJB container! – Seelenvirtuose May 24 '18 at 09:05
 - 
                    Please post the full stack trace. As the hint states, you can find the full stack trace in the server logs. – vanje May 24 '18 at 09:06
 - 
                    Code is given in http://zetcode.com/java/ejb/. Anyway, line 32 in Greet.java is firstBean.setName(request.getParameter("name")); – AlexScalar May 24 '18 at 09:07
 - 
                    @Seelenvirtuose: That could very well be the reason. Thanks for pointing that out! – AlexScalar May 24 '18 at 09:07
 
1 Answers
2
            Standard Tomcat distribution doesn't support EJBs. Use Tomcat EE for that, see for instance this answer.
        MirMasej
        
- 1,592
 - 12
 - 17
 
