Not retrieving from the Java Bean
posted 18 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Sir,
I have this code
***********************************************************************
On another page I tried to retrieve the data 'dWord' which i set in the bean
The code I used in the second page was:
***********************************************************************
But the output it shows was:
The URL:
which seems its not retrieving anything,
Please help
Thank you
[BPSouther: Added code tags]
[ July 26, 2007: Message edited by: Ben Souther ]
I have this code
***********************************************************************
On another page I tried to retrieve the data 'dWord' which i set in the bean
The code I used in the second page was:
***********************************************************************
But the output it shows was:
The URL:
which seems its not retrieving anything,
Please help
Thank you
[BPSouther: Added code tags]
[ July 26, 2007: Message edited by: Ben Souther ]
ZORAM<br />"If it's true that we are here to help others,<br />then what exactly are the others here for?"
posted 18 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Where is the that first block of code?
Is it in a bean, a servlet, a scriptlet on another page?
Is it in a bean, a servlet, a scriptlet on another page?
posted 18 years ago
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
It looks like you are using Struts and setting a property in an Action Form
The action for is not automatically in pageScope
-----------------------------------------------------
<jsp:useBean id="urlBean" scope="page" class="examples.simple.GenerateUrlBean" />
<jsp:setProperty name="urlBean" property="url" />
-----------------------------------------------------
The useBean, because the GenerateUrlBean is not found in the pageScope creates one with a default constructor. When you try to set the url property, there is no property in the request called 'url' so it sets a blank String to the url property of the GenerateUrlBean.
The action for is not automatically in pageScope
-----------------------------------------------------
<jsp:useBean id="urlBean" scope="page" class="examples.simple.GenerateUrlBean" />
<jsp:setProperty name="urlBean" property="url" />
-----------------------------------------------------
The useBean, because the GenerateUrlBean is not found in the pageScope creates one with a default constructor. When you try to set the url property, there is no property in the request called 'url' so it sets a blank String to the url property of the GenerateUrlBean.
| I can't beleive you just said that. Now I need to calm down with this tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |








