You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Thomas Hagedorn <Th...@alcatel.de> on 2000/08/30 17:12:52 UTC

Re: still problems with JSP and Beans--SOLVED

An update to the newest tomcat-build(2000-08-29) and running with
SDK1.3(IBM) solved all my problems - and is much faster than
tomcat3.1+SunSDK1.22 ;-)).
The only thing to change, is to include all the jars from
JBOSS_HOME/client into the classpath.

thanx and best regards
tom

Am Mit, 30 Aug 2000 schrieben Sie:
> Hi there,
> sometimes, if I use a bean in a JSP, it produces an internal server
> error:  
> java.lang.IllegalStateException: Response has already been committed
> 
> and iI have no clue, why it works in other pages.
> One reason, I figured out was if I try to use a bean with a full
> package name like "de.foo.bar.Application.MyBean". If I recompile the
> same bean without the package-statement, it works fine.
> 
> Another context in which it fails is the example below, where in the
> second one, I use an EJB in the bean I use in the jsp.
> 
> I'm using Tomcat 3.1 with SUNs JDK1.2.2 on RedHat6.2.
> Any help or hints will be highly appreciated.
> 
> best regards
> tom
> 
> x---here an example that works---
> <html><BODY>
> <jsp:useBean id="factory" class="CPBeanFactory" scope="request"/>
> <% ICustomerBean bean = (ICustomerBean)factory.create("CPCustomerBean");
>    bean.setName("CP_foo_bar");
>  %>
>     Share value = <%=bean.getName()%>
> </BODY></HTML>
> x---------end example------
> 
> x----here an example that fails-----
> <html><BODY>
> <jsp:useBean id="bean" class="CPEjbTestBean" scope="request"/>
> <%
>    bean.setName("CP_foo_bar");
>  %>
>     Share value = <%=bean.getName()%>
> </BODY></HTML>
> x---------end example------