wood burning stoves
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "Super User Checking" Watch "Super User Checking" New topic

Super User Checking

Naveen R R

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') {
else {
Thank You,
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

Naveen R R

Joined: May 04, 2001
Posts: 20
Thanks, Andrew. It works now.
I agree. Here's the link: http://aspose.com/file-tools
subject: Super User Checking
It's not a secret anymore!