aspose file tools*
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 Spring in Action this week in the Spring 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