Passing an input from jsp using bean:write tag

2003-09-18 Thread naveen . joshi
Hi,

How do i send an input to one of my get methods in Formbean from my JSP... 
It is something like i have String of 10 chars and i want only the first five 
chars. This input will be send by jsp. Based on the input my get method should 
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread Andrew Hill
You have posted this question like 50 billion times now with no response.
I dont really understand exactly what your asking (perhaps due to lack of
sleep?), and so havent tried answering. Possibly the same goes for many
other people who have read it. Perhaps you could try rephrasing it a
different way so that your problem is clearer to us all. Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 03:52
To: [EMAIL PROTECTED]
Subject: Passing an input from jsp using bean:write tag


Hi,

How do i send an input to one of my get methods in Formbean from my JSP...
It is something like i have String of 10 chars and i want only the first
five
chars. This input will be send by jsp. Based on the input my get method
should
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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


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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread naveen . joshi
The line of code in the jsp is something like this:
bean:write name=%=formBean% property=name[53] scope=request/

where 53 is a input parameter of getName(int size) method of FormBean.

Get method is something like this...

public void getName(int size){
return (this.sName.substring(0, size));
}

This was working fine all this time... now when i change my JDK from 131_03 to 
131_08, this doesnt work and throws error saying property 'name' is not 
indexed 

Thanks
Naveen

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 3:58 PM
To: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


You have posted this question like 50 billion times now with no response.
I dont really understand exactly what your asking (perhaps due to lack of
sleep?), and so havent tried answering. Possibly the same goes for many
other people who have read it. Perhaps you could try rephrasing it a
different way so that your problem is clearer to us all. Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 03:52
To: [EMAIL PROTECTED]
Subject: Passing an input from jsp using bean:write tag


Hi,

How do i send an input to one of my get methods in Formbean from my JSP...
It is something like i have String of 10 chars and i want only the first
five
chars. This input will be send by jsp. Based on the input my get method
should
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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


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


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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread Andrew Hill
snip
The line of code in the jsp is something like this:
bean:write name=%=formBean% property=name[53] scope=request/

where 53 is a input parameter of getName(int size) method of FormBean.

Get method is something like this...

public void getName(int size){
return (this.sName.substring(0, size));
}

This was working fine all this time... now when i change my JDK from 131_03
to
131_08, this doesnt work and throws error saying property 'name' is not
indexed
/snip

Hmm. I dont have any definitive solution myself, but this clarifies the
matter a lot and hopefully someone else should be able to have a good go at
pinpointing the problem.

My best guess is that your setters and getters dont quite meet bean
conventions. (When this is the case sometimes it works, sometimes it doesnt
which makes debugging a nightmare!)

Do you have more than one method named setName or getName? Ive found that
can cause all sorts of wierd problems of this nature.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:40
To: [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


do you some more info

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 3:58 PM
To: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


You have posted this question like 50 billion times now with no response.
I dont really understand exactly what your asking (perhaps due to lack of
sleep?), and so havent tried answering. Possibly the same goes for many
other people who have read it. Perhaps you could try rephrasing it a
different way so that your problem is clearer to us all. Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 03:52
To: [EMAIL PROTECTED]
Subject: Passing an input from jsp using bean:write tag


Hi,

How do i send an input to one of my get methods in Formbean from my JSP...
It is something like i have String of 10 chars and i want only the first
five
chars. This input will be send by jsp. Based on the input my get method
should
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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


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


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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread naveen . joshi
Sorry for the typo err in my earlier mailI have one set method and two get 
methods

public void setName(String name){
this.sName=name;
}
public String getName(){
return this.sName;
}
public String getName(int size){
return (this.sName.substring(0, size));
}

Thanks
Naveen

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 4:48 PM
To: Joshi, Naveen
Cc: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


snip
The line of code in the jsp is something like this:
bean:write name=%=formBean% property=name[53] scope=request/

where 53 is a input parameter of getName(int size) method of FormBean.

Get method is something like this...

public void getName(int size){
return (this.sName.substring(0, size));
}

This was working fine all this time... now when i change my JDK from 131_03
to
131_08, this doesnt work and throws error saying property 'name' is not
indexed
/snip

Hmm. I dont have any definitive solution myself, but this clarifies the
matter a lot and hopefully someone else should be able to have a good go at
pinpointing the problem.

My best guess is that your setters and getters dont quite meet bean
conventions. (When this is the case sometimes it works, sometimes it doesnt
which makes debugging a nightmare!)

Do you have more than one method named setName or getName? Ive found that
can cause all sorts of wierd problems of this nature.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:40
To: [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


do you some more info

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 3:58 PM
To: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


You have posted this question like 50 billion times now with no response.
I dont really understand exactly what your asking (perhaps due to lack of
sleep?), and so havent tried answering. Possibly the same goes for many
other people who have read it. Perhaps you could try rephrasing it a
different way so that your problem is clearer to us all. Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 03:52
To: [EMAIL PROTECTED]
Subject: Passing an input from jsp using bean:write tag


Hi,

How do i send an input to one of my get methods in Formbean from my JSP...
It is something like i have String of 10 chars and i want only the first
five
chars. This input will be send by jsp. Based on the input my get method
should
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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


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


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


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



Re: Passing an input from jsp using bean:write tag

2003-09-18 Thread Khalid K.
did you upgrade from Struts 1.02 to Struts 1.1
in Struts 1.1 properties of a form can be indexed and it uses [], so it
might get confused in parsing...
Just a thought...not sure if this will be of any help

Khalid

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Struts [EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 1:48 PM
Subject: RE: Passing an input from jsp using bean:write tag


 snip
 The line of code in the jsp is something like this:
 bean:write name=%=formBean% property=name[53] scope=request/

 where 53 is a input parameter of getName(int size) method of FormBean.

 Get method is something like this...

 public void getName(int size){
 return (this.sName.substring(0, size));
 }

 This was working fine all this time... now when i change my JDK from
131_03
 to
 131_08, this doesnt work and throws error saying property 'name' is not
 indexed
 /snip

 Hmm. I dont have any definitive solution myself, but this clarifies the
 matter a lot and hopefully someone else should be able to have a good go
at
 pinpointing the problem.

 My best guess is that your setters and getters dont quite meet bean
 conventions. (When this is the case sometimes it works, sometimes it
doesnt
 which makes debugging a nightmare!)

 Do you have more than one method named setName or getName? Ive found that
 can cause all sorts of wierd problems of this nature.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, 19 September 2003 04:40
 To: [EMAIL PROTECTED]
 Subject: RE: Passing an input from jsp using bean:write tag


 do you some more info

 -Original Message-
 From: andrew.david.hill [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 18, 2003 3:58 PM
 To: struts-user
 Subject: RE: Passing an input from jsp using bean:write tag


 You have posted this question like 50 billion times now with no response.
 I dont really understand exactly what your asking (perhaps due to lack of
 sleep?), and so havent tried answering. Possibly the same goes for many
 other people who have read it. Perhaps you could try rephrasing it a
 different way so that your problem is clearer to us all. Thanks.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, 19 September 2003 03:52
 To: [EMAIL PROTECTED]
 Subject: Passing an input from jsp using bean:write tag


 Hi,

 How do i send an input to one of my get methods in Formbean from my JSP...
 It is something like i have String of 10 chars and i want only the first
 five
 chars. This input will be send by jsp. Based on the input my get method
 should
 return a value.
 I was using something like this and it was working fine with jdk131_03
 bean:write name=user property=username[1]/
 The same is not working with other versions of JDK.

 Thanks
 Naveen


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


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


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


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





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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread Andrew Hill
That may well be your problem.
Try killing the getName() method (perhaps rename it getFullName() or
something) and see if it helps.
Hehe, I had problems like this when I was new to struts.
See this ancient and mildly amusing thread:
http://marc.theaimsgroup.com/?l=struts-userm=102697236923882w=2

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:55
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


Sorry for the typo err in my earlier mailI have one set method and two
get
methods

public void setName(String name){
this.sName=name;
}
public String getName(){
return this.sName;
}
public String getName(int size){
return (this.sName.substring(0, size));
}

Thanks
Naveen

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 4:48 PM
To: Joshi, Naveen
Cc: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


snip
The line of code in the jsp is something like this:
bean:write name=%=formBean% property=name[53] scope=request/

where 53 is a input parameter of getName(int size) method of FormBean.

Get method is something like this...

public void getName(int size){
return (this.sName.substring(0, size));
}

This was working fine all this time... now when i change my JDK from 131_03
to
131_08, this doesnt work and throws error saying property 'name' is not
indexed
/snip

Hmm. I dont have any definitive solution myself, but this clarifies the
matter a lot and hopefully someone else should be able to have a good go at
pinpointing the problem.

My best guess is that your setters and getters dont quite meet bean
conventions. (When this is the case sometimes it works, sometimes it doesnt
which makes debugging a nightmare!)

Do you have more than one method named setName or getName? Ive found that
can cause all sorts of wierd problems of this nature.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:40
To: [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


do you some more info

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 3:58 PM
To: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


You have posted this question like 50 billion times now with no response.
I dont really understand exactly what your asking (perhaps due to lack of
sleep?), and so havent tried answering. Possibly the same goes for many
other people who have read it. Perhaps you could try rephrasing it a
different way so that your problem is clearer to us all. Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 03:52
To: [EMAIL PROTECTED]
Subject: Passing an input from jsp using bean:write tag


Hi,

How do i send an input to one of my get methods in Formbean from my JSP...
It is something like i have String of 10 chars and i want only the first
five
chars. This input will be send by jsp. Based on the input my get method
should
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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


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


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


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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread naveen . joshi
No.. I still use struts 1.0_

-Original Message-
From: groups [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 5:05 PM
To: struts-user; andrew.david.hill
Cc: groups
Subject: Re: Passing an input from jsp using bean:write tag


did you upgrade from Struts 1.02 to Struts 1.1
in Struts 1.1 properties of a form can be indexed and it uses [], so it
might get confused in parsing...
Just a thought...not sure if this will be of any help

Khalid

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Struts [EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 1:48 PM
Subject: RE: Passing an input from jsp using bean:write tag


 snip
 The line of code in the jsp is something like this:
 bean:write name=%=formBean% property=name[53] scope=request/

 where 53 is a input parameter of getName(int size) method of FormBean.

 Get method is something like this...

 public void getName(int size){
 return (this.sName.substring(0, size));
 }

 This was working fine all this time... now when i change my JDK from
131_03
 to
 131_08, this doesnt work and throws error saying property 'name' is not
 indexed
 /snip

 Hmm. I dont have any definitive solution myself, but this clarifies the
 matter a lot and hopefully someone else should be able to have a good go
at
 pinpointing the problem.

 My best guess is that your setters and getters dont quite meet bean
 conventions. (When this is the case sometimes it works, sometimes it
doesnt
 which makes debugging a nightmare!)

 Do you have more than one method named setName or getName? Ive found that
 can cause all sorts of wierd problems of this nature.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, 19 September 2003 04:40
 To: [EMAIL PROTECTED]
 Subject: RE: Passing an input from jsp using bean:write tag


 do you some more info

 -Original Message-
 From: andrew.david.hill [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 18, 2003 3:58 PM
 To: struts-user
 Subject: RE: Passing an input from jsp using bean:write tag


 You have posted this question like 50 billion times now with no response.
 I dont really understand exactly what your asking (perhaps due to lack of
 sleep?), and so havent tried answering. Possibly the same goes for many
 other people who have read it. Perhaps you could try rephrasing it a
 different way so that your problem is clearer to us all. Thanks.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, 19 September 2003 03:52
 To: [EMAIL PROTECTED]
 Subject: Passing an input from jsp using bean:write tag


 Hi,

 How do i send an input to one of my get methods in Formbean from my JSP...
 It is something like i have String of 10 chars and i want only the first
 five
 chars. This input will be send by jsp. Based on the input my get method
 should
 return a value.
 I was using something like this and it was working fine with jdk131_03
 bean:write name=user property=username[1]/
 The same is not working with other versions of JDK.

 Thanks
 Naveen


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


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


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


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





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


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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread naveen . joshi
Thanks Andrew,

I will go thru it and get back to u...

Naveen

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 5:04 PM
To: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


That may well be your problem.
Try killing the getName() method (perhaps rename it getFullName() or
something) and see if it helps.
Hehe, I had problems like this when I was new to struts.
See this ancient and mildly amusing thread:
http://marc.theaimsgroup.com/?l=struts-userm=102697236923882w=2

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:55
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


Sorry for the typo err in my earlier mailI have one set method and two
get
methods

public void setName(String name){
this.sName=name;
}
public String getName(){
return this.sName;
}
public String getName(int size){
return (this.sName.substring(0, size));
}

Thanks
Naveen

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 4:48 PM
To: Joshi, Naveen
Cc: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


snip
The line of code in the jsp is something like this:
bean:write name=%=formBean% property=name[53] scope=request/

where 53 is a input parameter of getName(int size) method of FormBean.

Get method is something like this...

public void getName(int size){
return (this.sName.substring(0, size));
}

This was working fine all this time... now when i change my JDK from 131_03
to
131_08, this doesnt work and throws error saying property 'name' is not
indexed
/snip

Hmm. I dont have any definitive solution myself, but this clarifies the
matter a lot and hopefully someone else should be able to have a good go at
pinpointing the problem.

My best guess is that your setters and getters dont quite meet bean
conventions. (When this is the case sometimes it works, sometimes it doesnt
which makes debugging a nightmare!)

Do you have more than one method named setName or getName? Ive found that
can cause all sorts of wierd problems of this nature.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:40
To: [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


do you some more info

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 3:58 PM
To: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


You have posted this question like 50 billion times now with no response.
I dont really understand exactly what your asking (perhaps due to lack of
sleep?), and so havent tried answering. Possibly the same goes for many
other people who have read it. Perhaps you could try rephrasing it a
different way so that your problem is clearer to us all. Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 03:52
To: [EMAIL PROTECTED]
Subject: Passing an input from jsp using bean:write tag


Hi,

How do i send an input to one of my get methods in Formbean from my JSP...
It is something like i have String of 10 chars and i want only the first
five
chars. This input will be send by jsp. Based on the input my get method
should
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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


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


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


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


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



RE: Passing an input from jsp using bean:write tag

2003-09-18 Thread Andrew Hill
Heres the link to my original question to which the link is a response btw:
http://marc.theaimsgroup.com/?l=struts-userm=102696975022454w=2


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 05:04
To: Struts
Subject: RE: Passing an input from jsp using bean:write tag


That may well be your problem.
Try killing the getName() method (perhaps rename it getFullName() or
something) and see if it helps.
Hehe, I had problems like this when I was new to struts.
See this ancient and mildly amusing thread:
http://marc.theaimsgroup.com/?l=struts-userm=102697236923882w=2

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:55
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


Sorry for the typo err in my earlier mailI have one set method and two
get
methods

public void setName(String name){
this.sName=name;
}
public String getName(){
return this.sName;
}
public String getName(int size){
return (this.sName.substring(0, size));
}

Thanks
Naveen

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 4:48 PM
To: Joshi, Naveen
Cc: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


snip
The line of code in the jsp is something like this:
bean:write name=%=formBean% property=name[53] scope=request/

where 53 is a input parameter of getName(int size) method of FormBean.

Get method is something like this...

public void getName(int size){
return (this.sName.substring(0, size));
}

This was working fine all this time... now when i change my JDK from 131_03
to
131_08, this doesnt work and throws error saying property 'name' is not
indexed
/snip

Hmm. I dont have any definitive solution myself, but this clarifies the
matter a lot and hopefully someone else should be able to have a good go at
pinpointing the problem.

My best guess is that your setters and getters dont quite meet bean
conventions. (When this is the case sometimes it works, sometimes it doesnt
which makes debugging a nightmare!)

Do you have more than one method named setName or getName? Ive found that
can cause all sorts of wierd problems of this nature.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 04:40
To: [EMAIL PROTECTED]
Subject: RE: Passing an input from jsp using bean:write tag


do you some more info

-Original Message-
From: andrew.david.hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 3:58 PM
To: struts-user
Subject: RE: Passing an input from jsp using bean:write tag


You have posted this question like 50 billion times now with no response.
I dont really understand exactly what your asking (perhaps due to lack of
sleep?), and so havent tried answering. Possibly the same goes for many
other people who have read it. Perhaps you could try rephrasing it a
different way so that your problem is clearer to us all. Thanks.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, 19 September 2003 03:52
To: [EMAIL PROTECTED]
Subject: Passing an input from jsp using bean:write tag


Hi,

How do i send an input to one of my get methods in Formbean from my JSP...
It is something like i have String of 10 chars and i want only the first
five
chars. This input will be send by jsp. Based on the input my get method
should
return a value.
I was using something like this and it was working fine with jdk131_03
bean:write name=user property=username[1]/
The same is not working with other versions of JDK.

Thanks
Naveen


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


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


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


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


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