Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
Servlets
Bean members as boolean or String?
Timothy Sam
,
Ranch Hand
Aug 23, 2006 08:47:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
Hi, in the
servlet
context is it ideal to make your bean members of boolean type or should I just make them
String
types as any other types in my class? Will I have a problem if I do it like this?
package beans; public class UserFormBean { String userId = ""; String username = ""; String password = ""; String email = ""; String contactNumber = ""; String locationId = ""; String status = ""; boolean online = false; String dateCreated = ""; public UserFormBean() { } public String getContactNumber() { return contactNumber; } public void setContactNumber(String contactNumber) { this.contactNumber = contactNumber; } public String getDateCreated() { return dateCreated; } public void setDateCreated(String dateCreated) { this.dateCreated = dateCreated; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getLocationId() { return locationId; } public void setLocationId(String locationId) { this.locationId = locationId; } public boolean isOnline() { return online; } public void setOnline(boolean online) { this.online = online; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
Bear Bibeault
,
Sheriff
staff
Aug 23, 2006 09:43:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
There should be no problems using boolean properties.
Post by:
autobot
Where does a nanny get ground to air missles? Protect this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
This thread has been viewed 835 times.
Similar Threads
getting errors in tomcat server
Problems with bean example
Use a UseBean id within a scriptlet
Exception setting property value with CGLIB
compilation error
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:43:48
.