Looking at the source for the introspecthelper, I see that it will throw
a JasperException with a message on jsp.error.beans.noproperty or
jsp.error.beans.nomethod.setproperty errors. The rest is clumped into a
try that throws a JasperException without a message. I'm looking at this
trying to find out what would be failing and throwing the exception in
this case. Any help would be appreciated. What servlet API spec is
tomcat 3.2 using? I was looking at the servlet 2.1 spec and its
ServletException class (which the JasperException class is based on)
doesn't have a constructor to only take an exception. The only one that
takes an exception as an argument also takes a String message (public
ServletException(String message, Throwable rootCause)).

I'll be looking for an email with any help while I wade through the
src...

~Rob

Here is the source for
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper()

    // __begin introspecthelperMethod
    public static void introspecthelper(Object bean, String prop,
                                        String value, ServletRequest request,
                                        String param, boolean ignoreMethodNF) 
                                        throws JasperException
    {
        java.lang.reflect.Method method = null;
        Class                    type   = null;
        try {
            java.beans.BeanInfo info
                = java.beans.Introspector.getBeanInfo(bean.getClass());
            if ( info != null ) {
                java.beans.PropertyDescriptor pd[]
                    = info.getPropertyDescriptors();
                for (int i = 0 ; i < pd.length ; i++) {
                    if ( pd[i].getName().equals(prop) ) {
                        method = pd[i].getWriteMethod();
                        type   = pd[i].getPropertyType();
                        break;
                    }
                }
            }
            if ( method != null ) {
                if (type.isArray()) {
                    if (request == null) {
                        throw new JasperException(Constants.getString(
                               
"jsp.error.beans.setproperty.noindexset",
                                new Object[] {}));
                    };
                    Class t = type.getComponentType();
                    String[] values = request.getParameterValues(param);
                    //XXX Please check.
                    if(values == null) return;
                    if(t.equals(String.class)) {
                        method.invoke(bean, new Object[] { values });
                    } else {
                        Object tmpval = null;
                        createTypedArray (bean, method, values, t); 
                    }
                } else {
                    if(value == null || (param != null && value.equals(""))) return;
                    Object oval = convert(value, type);
                    if ( oval != null )
                        method.invoke(bean, new Object[] { oval });
                }
            }
        } catch (Exception ex) {
            throw new JasperException (ex);
        }
        if (!ignoreMethodNF && (method == null)) {
            if (type == null) {
                throw new JasperException(Constants.getString(
                        "jsp.error.beans.noproperty",
                        new Object[] {prop,
bean.getClass().getName()}));
            } else {
                throw new JasperException(Constants.getString(
                        "jsp.error.beans.nomethod.setproperty",
                        new Object[] {prop,
bean.getClass().getName()}));
            }
        }
    }
    // __end introspecthelperMethod


Edson Carlos Ericksson Richter wrote:
> 
> Yes, you are correct... I've simulated this and get my pages redirected to
> my own login.jsp page, but I've not done tests with final int...
> 
> Edson Richter
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to