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/28 14:25:01 UTC

jsp-exceptions

Hi there,

Sometimes, if I try to use a bean in a jsp, I get the strange message:
	java.lang.IllegalStateException: Response has already been committed

but I've absolutely no clue what happens!
x----
Example code which fails:
<html>
<BODY>
get factory<br>
<jsp:useBean id="factory" class="CPBeanFactory" scope="request"/>
get bean<br>
<% ICustomerBean bean = (ICustomerBean)factory.create("CPEjbTestBean");  %>
bean created<br>
<%
   bean.setName("CP_foo_bar");
 %>
name set<br>
    Share value = <%=bean.getName()%>
 
</BODY>
</HTML> 
x-------

in the statement 'bean.setName()' it fails, but another bean,
implementing the same interface, works fine and if I test the beans in
a small testclass, it also works fine.
Any ideas, hints ...

BTW: Is there anywhere a good example of how to use EJBs with jsps (I'm
using Tomcat 3.2b, apache 1.3.12, jboss(build from 2000-08-24) on
Linux(RedHat6.2))

thanks in advance
tom