tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Randolf <...@subnet.at>
Subject Re: jsp:setProperty and exceptions
Date Fri, 29 Sep 2000 10:17:50 GMT
hi again!

ist this a known bug? do others have the same error? can somebody
confirm/verify this? am i doing something wrong?

please help!

br1

Bruno Randolf wrote:
> 
> hello!
> 
> i use tomcat 3.1 (jdk 1.3.0beta_refresh) and apache 1.3.12 under linux.
> 
> when i try to set a property of a bean with
> <jsp:setProperty .../> and the set method throws an exception, i get an
> org.apache.jasper.JasperException with the root cause
> java.lang.reflect.InvocationTargetException.
> 
> throwing an exception (and handling it in an errorpage) in
> <jsp:getProperty .../> works fine. it also works when i call the
> corresponding set method inside the script (<% %>) tags.
> 
> is this a bug, or do i have a buggy setup of tomcat?
> 
> here's some code to verify:
> 
> the bean:
> --------------------------------------------------------
> public class Test {
>         public int getTest() throws Exception {
>                 throw new Exception();
>         }
> 
>         public void setTest( int i ) throws Exception {
>                 throw new Exception();
>         }
> }
> --------------------------------------------------------
> 
> the jsp
> --------------------------------------------------------
> <%@ page language="java" import="Test, CheckException" %>
> 
> <jsp:useBean id="t" scope="page" class="Test"/>
> 
> <jsp:setProperty name="t" property="test" value="1"/>
> 
> <%-- works
> <jsp:getProperty name="t" property="test"/>
> --%>
> 
> <%
> // works
> //t.setTest(1);
> %>
> --------------------------------------------------------
> 
> thanks for any help!
> 
> br1

Mime
View raw message