This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Super User Checking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Super User Checking" Watch "Super User Checking" New topic
Author

Super User Checking

Naveen R R
Greenhorn

Joined: May 04, 2001
Posts: 20
Could anyone help me with this? The error it gives: The operator named == is not defined for the argument type(s) java.lang.String, char
public void validateSecurity(String loginId, String progId, String funcId, OfficeUserBean user) throws NoAccessException, db.NoConnectionException, db.DBException {
try {
if (user.getSuperUser() == 'X') {
return;
}
else {
-----
-----
Thank You,
Naveen
Andrew Shafer
Ranch Hand

Joined: Jan 19, 2001
Posts: 338

The error tells you what is wrong. You are trying to compare a String with a char with ==, which is not defined.
Off the top of my head:

That should work.
.equals() is a method of java.lang.String


!_I_Know_Kung_Fu_!
Naveen R R
Greenhorn

Joined: May 04, 2001
Posts: 20
Thanks, Andrew. It works now.
Naveen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Super User Checking
 
Similar Threads
session
Hibernate Query Language where clause
convert struts form value to an integer value
User Agent String???
change password