tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Ng" <woonb...@yahoo.com>
Subject Application in Tomcat 3.2.2 wun work in J2EE?
Date Thu, 14 Feb 2002 14:26:19 GMT
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">


  <TR><TD><span style = "font-family:Arial;font-size:8pt">Login : &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>

  <TR><TD><span style = "font-family:Arial;font-size:8pt">Password :
   <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">


  <TR><TD><span style = "font-family:Arial;font-size:8pt">Login as :<br>
  <b><jsp:getProperty name="memberBean" property="memberId" /></b><br>
   Login time : <br><b>
   <%=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
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
995)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1088
)
	at java.lang.Thread.run(Thread.java:484)

Root Cause:
java.lang.ClassNotFoundException: user.UserBean
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1264)
	at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1113)
	at
org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:18
1)
	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
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:215)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:368)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
995)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1088
)
	at java.lang.Thread.run(Thread.java:484)


============================================================================
=================================



It really makes me wonder, are J2EE using the same specification as Tomcat?
Why apps developed in Tomcat wun run under J2EE? Or Have I simply forgotten
some important steps?



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message