Forums Register Login

why to use setproperty method in Java Bean including * symbol

+Pie Number of slices to send: Send
Why are we using setProperty method including "*" symbol in the below piece of code.



What actually the second line of code is doing and why we are only assigning the property as * not any other symbol. As i tried all these and found error during compilation.
+Pie Number of slices to send: Send
 

buntha Choudhary wrote:Why are we using setProperty method including "*" symbol in the below piece of code


We aren't.

That's a very old-fashioned and discredited way to set the values of the bean when it was deemed OK to submit forms to JSPs for processing. That is no longer an accepted practice.

Form submissions should be made to servlets which then direct the processing of the data. Within the servlet you can obtain the parameter values individually via getParameter(), or you can fetch the Jakarta BeanUtils project and use BeanUtils.populate() to automatically populate a bean with the parameter values.
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1305 times.
Similar Threads
jsp usebean
Overriding xml file
invalid FormalParameterList
problem in Compiling servlets
System class
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:24:08.