RE: Application in Tomcat 3.2.2 wun work in J2EE?
It looks like J2EE can't find the class user.UserBean. I would suggest you move that class into the WEB-INF/classes/user directory and try again. Randy -Original Message- From: Keith Ng [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 9:26 AM To: Tomcat Users List Subject: Application in Tomcat 3.2.2 wun work in J2EE? Ok. I have decided to provide a clear example. I have moved a webapp folder to J2EE's Public_html there is this file, which works completely fine in tomcat. == == = %@ page import = java.util.Calendar; % !-- LOGIN FORM(absolute positioning) -- jsp:useBean id=memberBean class=user.UserBean scope=session/ !--To set the id to retrieve from the database,use setProperty in InqBean-- P style=LEFT: 14px; POSITION: absolute; TOP: 200px % if (!memberBean.isUserValid()){ % FORM name = loginForm method = post onSubmit = return checkText2() action=../jsp/login.jsp TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid TRTDspan style = font-family:Arial;font-size:8ptLogin : nbsp; INPUT name=memberId size=8 maxlength = 9 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TRTDspan style = font-family:Arial;font-size:8ptPassword : INPUT type=password name=password size=5 maxlength = 10 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TR TD align=left INPUT style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; FONT-SIZE: 9pt type=submit value=Login /TD /TR /TABLE /FORM % } else{ Calendar cal = Calendar.getInstance(); % TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid width = 110 TRTDspan style = font-family:Arial;font-size:8ptLogin as :br bjsp:getProperty name=memberBean property=memberId //bbr Login time : brb %=cal.getTime()%/b /span/TD/TR /TABLE % } % /P == == but it simply wun work in J2EE's server. It gives an error liek this. == == === A Servlet Exception Has Occurred Exception Report: org.apache.jasper.JasperException: user.UserBean at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepo sitory.java:18 3) at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPr opertyGenerato r.java:102) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrap per.generate(J spParseEventListener.java:831) at org.apache.jasper.compiler.JspParseEventListener.generateAll(J spParseEventLi stener.java:241) at org.apache.jasper.compiler.JspParseEventListener.endPageProces sing(JspParseE ventListener.java:197) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:215) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfN ecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service (JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet .java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$0(Appli cationFilterCh ain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(Applicat ionFilterChain .java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterCh ain.java:172) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.ja va:215) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardP ipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(Certificat
Re: Application in Tomcat 3.2.2 wun work in J2EE?
Hi Keith, I am not completely sure what you intend to do, but I am running myself a J2EE application with Apache, Tomcat and Jonas servers. The Apache server is used for handling static HTML pages, the Tomcat server is used for handling JSP's and servlets. The Jonas server is used for handling requests to enterprise beans. You need a special J2EE server for the entity beans. Jonas is a free server, developed by Evidian (www.evidian.com). They have good documentation, and good mailing lists. I am running Tomcat 3.2.1 with Jonas. I have tried to run Tomcat 4.0.1 with Jonas, but unfortunately have not been able yet to get that working. Another free J2EE server is JBOSS, at least it is mentioned several times in the archives. I have no experience with it myself, but the reactions are positive. I do not know which versions of J2EE specifications are supported by any of the servers mentioned. It is always stated, but I forgot about them. Hope this helps, Sophie Keith Ng wrote: Ok. I have decided to provide a clear example. I have moved a webapp folder to J2EE's Public_html there is this file, which works completely fine in tomcat. = %@ page import = java.util.Calendar; % !-- LOGIN FORM(absolute positioning) -- jsp:useBean id=memberBean class=user.UserBean scope=session/ !--To set the id to retrieve from the database,use setProperty in InqBean-- P style=LEFT: 14px; POSITION: absolute; TOP: 200px % if (!memberBean.isUserValid()){ % FORM name = loginForm method = post onSubmit = return checkText2() action=../jsp/login.jsp TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid TRTDspan style = font-family:Arial;font-size:8ptLogin : nbsp; INPUT name=memberId size=8 maxlength = 9 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TRTDspan style = font-family:Arial;font-size:8ptPassword : INPUT type=password name=password size=5 maxlength = 10 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TR TD align=left INPUT style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; FONT-SIZE: 9pt type=submit value=Login /TD /TR /TABLE /FORM % } else{ Calendar cal = Calendar.getInstance(); % TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid width = 110 TRTDspan style = font-family:Arial;font-size:8ptLogin as :br bjsp:getProperty name=memberBean property=memberId //bbr Login time : brb %=cal.getTime()%/b /span/TD/TR /TABLE % } % /P but it simply wun work in J2EE's server. It gives an error liek this. === A Servlet Exception Has Occurred Exception Report: org.apache.jasper.JasperException: user.UserBean at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:18 3) at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerato r.java:102) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J spParseEventListener.java:831) at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi stener.java:241) at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE ventListener.java:197) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:215) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:528) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.access$0(ApplicationFilterCh ain.java:197) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain .java:176) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:172) at
RE: Application in Tomcat 3.2.2 wun work in J2EE?
Hi Thanks for replying. You see, all I wanted to do is to run all my pages within the J2EE1.3 specification folder and use only the J2EE server to host all my servlets and JSP. Im on a school assignment and have always used TOMCAT until I realised I could be using EJB in future. Its just an assignment I would present so I do not want it to be too complex. The familiar way I have always worked with Servlets and JSP are creating a new folder , add some configuration files all within WEBAPPS folder in TOMCAT. Then I will compile using servlet.jar in the lib. However, since downloading this J2EE, I guess I would be using the public_html folder in J2SDKee1.3 to act like webapp in tomcat, and I do not think i would be using the deployment tool. had used it and found it quite hard. However, it cant seem to compile some of my jsp files like before in tomcat. Im still a newbie, so I reli need help and advice -Original Message- From: sophie [mailto:sophie]On Behalf Of sophie fischer Sent: Thursday, February 14, 2002 10:54 PM To: Tomcat Users List Subject: Re: Application in Tomcat 3.2.2 wun work in J2EE? Hi Keith, I am not completely sure what you intend to do, but I am running myself a J2EE application with Apache, Tomcat and Jonas servers. The Apache server is used for handling static HTML pages, the Tomcat server is used for handling JSP's and servlets. The Jonas server is used for handling requests to enterprise beans. You need a special J2EE server for the entity beans. Jonas is a free server, developed by Evidian (www.evidian.com). They have good documentation, and good mailing lists. I am running Tomcat 3.2.1 with Jonas. I have tried to run Tomcat 4.0.1 with Jonas, but unfortunately have not been able yet to get that working. Another free J2EE server is JBOSS, at least it is mentioned several times in the archives. I have no experience with it myself, but the reactions are positive. I do not know which versions of J2EE specifications are supported by any of the servers mentioned. It is always stated, but I forgot about them. Hope this helps, Sophie Keith Ng wrote: Ok. I have decided to provide a clear example. I have moved a webapp folder to J2EE's Public_html there is this file, which works completely fine in tomcat. = %@ page import = java.util.Calendar; % !-- LOGIN FORM(absolute positioning) -- jsp:useBean id=memberBean class=user.UserBean scope=session/ !--To set the id to retrieve from the database,use setProperty in InqBean-- P style=LEFT: 14px; POSITION: absolute; TOP: 200px % if (!memberBean.isUserValid()){ % FORM name = loginForm method = post onSubmit = return checkText2() action=../jsp/login.jsp TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid TRTDspan style = font-family:Arial;font-size:8ptLogin : nbsp; INPUT name=memberId size=8 maxlength = 9 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TRTDspan style = font-family:Arial;font-size:8ptPassword : INPUT type=password name=password size=5 maxlength = 10 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TR TD align=left INPUT style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; FONT-SIZE: 9pt type=submit value=Login /TD /TR /TABLE /FORM % } else{ Calendar cal = Calendar.getInstance(); % TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid width = 110 TRTDspan style = font-family:Arial;font-size:8ptLogin as :br bjsp:getProperty name=memberBean property=memberId //bbr Login time : brb %=cal.getTime()%/b /span/TD/TR /TABLE % } % /P but it simply wun work in J2EE's server. It gives an error liek this. === A Servlet Exception Has Occurred Exception Report: org.apache.jasper.JasperException: user.UserBean at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:18 3) at org.apache.jasper.compiler.GetPropertyGenerator.generate(GetPropertyGenerato r.java:102) at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J spParseEventListener.java:831) at org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi stener.java:241) at org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE ventListener.java:197
RE: Application in Tomcat 3.2.2 wun work in J2EE?
Hi, You can find an archive with both JBoss 2.4.4 and Tomcat 4.0.1 here: http://prdownloads.sourceforge.net/jboss/JBoss-2.4.4_Tomcat-4.0.1.zip If you need some help for configuration, there is a good mailing list and docs on the website: http://jboss.org/ Enjoy, Loïc Lefèvre -Message d'origine- De : Keith Ng [mailto:[EMAIL PROTECTED]] Envoyé : jeudi 14 février 2002 15:58 À : Tomcat Users List Objet : RE: Application in Tomcat 3.2.2 wun work in J2EE? Hi Thanks for replying. You see, all I wanted to do is to run all my pages within the J2EE1.3 specification folder and use only the J2EE server to host all my servlets and JSP. Im on a school assignment and have always used TOMCAT until I realised I could be using EJB in future. Its just an assignment I would present so I do not want it to be too complex. The familiar way I have always worked with Servlets and JSP are creating a new folder , add some configuration files all within WEBAPPS folder in TOMCAT. Then I will compile using servlet.jar in the lib. However, since downloading this J2EE, I guess I would be using the public_html folder in J2SDKee1.3 to act like webapp in tomcat, and I do not think i would be using the deployment tool. had used it and found it quite hard. However, it cant seem to compile some of my jsp files like before in tomcat. Im still a newbie, so I reli need help and advice -Original Message- From: sophie [mailto:sophie]On Behalf Of sophie fischer Sent: Thursday, February 14, 2002 10:54 PM To: Tomcat Users List Subject: Re: Application in Tomcat 3.2.2 wun work in J2EE? Hi Keith, I am not completely sure what you intend to do, but I am running myself a J2EE application with Apache, Tomcat and Jonas servers. The Apache server is used for handling static HTML pages, the Tomcat server is used for handling JSP's and servlets. The Jonas server is used for handling requests to enterprise beans. You need a special J2EE server for the entity beans. Jonas is a free server, developed by Evidian (www.evidian.com). They have good documentation, and good mailing lists. I am running Tomcat 3.2.1 with Jonas. I have tried to run Tomcat 4.0.1 with Jonas, but unfortunately have not been able yet to get that working. Another free J2EE server is JBOSS, at least it is mentioned several times in the archives. I have no experience with it myself, but the reactions are positive. I do not know which versions of J2EE specifications are supported by any of the servers mentioned. It is always stated, but I forgot about them. Hope this helps, Sophie Keith Ng wrote: Ok. I have decided to provide a clear example. I have moved a webapp folder to J2EE's Public_html there is this file, which works completely fine in tomcat. = %@ page import = java.util.Calendar; % !-- LOGIN FORM(absolute positioning) -- jsp:useBean id=memberBean class=user.UserBean scope=session/ !--To set the id to retrieve from the database,use setProperty in InqBean-- P style=LEFT: 14px; POSITION: absolute; TOP: 200px % if (!memberBean.isUserValid()){ % FORM name = loginForm method = post onSubmit = return checkText2() action=../jsp/login.jsp TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid TRTDspan style = font-family:Arial;font-size:8ptLogin : nbsp; INPUT name=memberId size=8 maxlength = 9 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TRTDspan style = font-family:Arial;font-size:8ptPassword : INPUT type=password name=password size=5 maxlength = 10 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TR TD align=left INPUT style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; FONT-SIZE: 9pt type=submit value=Login /TD /TR /TABLE /FORM % } else{ Calendar cal = Calendar.getInstance(); % TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid width = 110 TRTDspan style = font-family:Arial;font-size:8ptLogin as :br bjsp:getProperty name=memberBean property=memberId //bbr Login time : brb %=cal.getTime()%/b /span/TD/TR /TABLE % } % /P but it simply wun work in J2EE's server. It gives an error liek this. === A Servlet Exception Has Occurred Exception Report: org.apache.jasper.JasperException: user.UserBean at org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:18 3
Re: Application in Tomcat 3.2.2 wun work in J2EE?
Hi, I always thought that for J2EE you need a special server. And that will take a lot of time. From the example you give I gather you want to use javabeans, which is something different from EJB. I would put my javabeans in a JAR file, and then store the JAR-file in WEB-INF/lib. And in the directory ejbapps if necessary. In the JAR file there should be a correct package definition for your javabeans. Hope this helps. Sophie Keith Ng wrote: Hi Thanks for replying. You see, all I wanted to do is to run all my pages within the J2EE1.3 specification folder and use only the J2EE server to host all my servlets and JSP. Im on a school assignment and have always used TOMCAT until I realised I could be using EJB in future. Its just an assignment I would present so I do not want it to be too complex. The familiar way I have always worked with Servlets and JSP are creating a new folder , add some configuration files all within WEBAPPS folder in TOMCAT. Then I will compile using servlet.jar in the lib. However, since downloading this J2EE, I guess I would be using the public_html folder in J2SDKee1.3 to act like webapp in tomcat, and I do not think i would be using the deployment tool. had used it and found it quite hard. However, it cant seem to compile some of my jsp files like before in tomcat. Im still a newbie, so I reli need help and advice -Original Message- From: sophie [mailto:sophie]On Behalf Of sophie fischer Sent: Thursday, February 14, 2002 10:54 PM To: Tomcat Users List Subject: Re: Application in Tomcat 3.2.2 wun work in J2EE? Hi Keith, I am not completely sure what you intend to do, but I am running myself a J2EE application with Apache, Tomcat and Jonas servers. The Apache server is used for handling static HTML pages, the Tomcat server is used for handling JSP's and servlets. The Jonas server is used for handling requests to enterprise beans. You need a special J2EE server for the entity beans. Jonas is a free server, developed by Evidian (www.evidian.com). They have good documentation, and good mailing lists. I am running Tomcat 3.2.1 with Jonas. I have tried to run Tomcat 4.0.1 with Jonas, but unfortunately have not been able yet to get that working. Another free J2EE server is JBOSS, at least it is mentioned several times in the archives. I have no experience with it myself, but the reactions are positive. I do not know which versions of J2EE specifications are supported by any of the servers mentioned. It is always stated, but I forgot about them. Hope this helps, Sophie Keith Ng wrote: Ok. I have decided to provide a clear example. I have moved a webapp folder to J2EE's Public_html there is this file, which works completely fine in tomcat. = %@ page import = java.util.Calendar; % !-- LOGIN FORM(absolute positioning) -- jsp:useBean id=memberBean class=user.UserBean scope=session/ !--To set the id to retrieve from the database,use setProperty in InqBean-- P style=LEFT: 14px; POSITION: absolute; TOP: 200px % if (!memberBean.isUserValid()){ % FORM name = loginForm method = post onSubmit = return checkText2() action=../jsp/login.jsp TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid TRTDspan style = font-family:Arial;font-size:8ptLogin : nbsp; INPUT name=memberId size=8 maxlength = 9 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TRTDspan style = font-family:Arial;font-size:8ptPassword : INPUT type=password name=password size=5 maxlength = 10 style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid /span/TD/TR TR TD align=left INPUT style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; FONT-SIZE: 9pt type=submit value=Login /TD /TR /TABLE /FORM % } else{ Calendar cal = Calendar.getInstance(); % TABLE style=BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid width = 110 TRTDspan style = font-family:Arial;font-size:8ptLogin as :br bjsp:getProperty name=memberBean property=memberId //bbr Login time : brb %=cal.getTime()%/b /span/TD/TR /TABLE % } % /P but it simply wun work in J2EE's server. It gives an error liek this. === A Servlet Exception Has Occurred Exception Report: org.apache.jasper.JasperException: user.UserBean