AFAIK, no way with struts, I think.
From: Mariano García <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Write a bean property from a jsp page
Date:
I don't want to access a setter or getter method of a bean. I want to write
on my jsp page the result of a method. So, this method is not a typical
getter method. This method has a parameter, and depending of this parameter,
it returns an int value.
My question is, how can I execute this method us
I usually do it like this in the bean,
private int id = 0 ;
with the getter method here :
public int getId() {
return id ;
}
and the associated setter method:
public void setId(int input) {
id = input ;
}
.
Is yours something like that by any chance ?
Mariano García wrote:
Your proposal before
> Your proposal before was fine:
>
>
>
> However not too sure about if the get method needs to return a String in
> order Java can actually make nicely reflection over the Bean. Otherwise I
> guess you would get a "Not accesor method found...".
>
> Why do you actually returns a int value?
>
My
m: Mariano García <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: Write a bean property from a jsp page
Date: Fri, 12 Sep 2003 09:40:38 +0200
>
> chec
>
> check that your Bean has get/set methods for accessing your property, also
> of course, check that Bean is in some of the JSP scopes.
>
Ok. I have another question.
How can I write on my jsp page a bean method result? For example, I have a
Bean with the following method:
public int
lt;[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Write a bean property from a jsp page
Date: Fri, 12 Sep 2003 09:18:34 +0200
Hi all,
How can I write a bean property value from my jsp page? I think I should
use
Tomcat says me that it cannot find bean Bean in any scope.
Hi all,
How can I write a bean property value from my jsp page? I think I should use
Tomcat says me that it cannot find bean Bean in any scope. What is the
problem?
Regards.
_
Mariano García
Ingeniero de Sistemas
Optiva Media
Viriato,25 - 28010 Madrid - España
t. +34 91 445 96 95
m.
8 matches
Mail list logo