| | |
back end of the "< jsp:setProperty" tag
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2006
Posts: 68
Reputation:
Solved Threads: 0
Hi
I am using the "< jsp:setProperty " tag....
so I want to set the properties manually if the corresponding property field is empty(null) in the web form.
So it was hard corded in the setter method of the bean class.
public void setName(String name) {
if (name == null) {
this.name = " ";
}
else {
this.name = name;
}
}
but this is also not working. That is when the given name field is empty, the created object still has null for its name field.
so I suggest that when some field is empty, this tag library does not call the corresponding setter method..
Please anyone can help me to do this, and please explain me how this tag is internally worked....
I am using the "< jsp:setProperty " tag....
so I want to set the properties manually if the corresponding property field is empty(null) in the web form.
So it was hard corded in the setter method of the bean class.
public void setName(String name) {
if (name == null) {
this.name = " ";
}
else {
this.name = name;
}
}
but this is also not working. That is when the given name field is empty, the created object still has null for its name field.
so I suggest that when some field is empty, this tag library does not call the corresponding setter method..
Please anyone can help me to do this, and please explain me how this tag is internally worked....
jsp:setProperty does not set the value in the bean, it rather sets a bean as a variable that can be accessed from scriptlet code on the JSP.
Completely deprecated with the introduction of JSTL and now JSF.
Completely deprecated with the introduction of JSTL and now JSF.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- Need to read "Title tag" and "original date" of pictures (Visual Basic 4 / 5 / 6)
- FlexGrid issue and error "Invalid Row value".... (Visual Basic 4 / 5 / 6)
- how work <jsp:setProperty….> tag internaly (JSP)
- VB.net Front-end Access Back-End Question (VB.NET)
- When a host says "included scripts" (Networking Hardware Configuration)
- "page cannot be displayed" only w/ router (Networking Hardware Configuration)
- Need Help with "Please Insert Disk" message in Quark (Mac Software)
Other Threads in the JSP Forum
- Previous Thread: problem in inserting data in msaccess
- Next Thread: email sending from a jsp page after submit button
| Thread Tools | Search this Thread |
Tag cloud for JSP
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






