Jump to content

cannot find symbol

- - - - -

  • Please log in to reply
3 replies to this topic

#1
commissioner

commissioner

    Newbie

  • Members
  • PipPip
  • 17 posts
Hi everyone, am trying to do encryption but it return the error as follows. what do i do to fix the error. thanks


C:\Tomcat 6.0\webapps\work\WEB-INF\classes\test>javac User.java

User.java:28: cannot find symbol

symbol  : method setPassword(java.lang.String)

location: class test.User

  user.setPassword(test.PasswordService.getInstance().encrypt(request.getParamet

er("password")));

      ^

1 error




#2
commissioner

commissioner

    Newbie

  • Members
  • PipPip
  • 17 posts
I think the problem is setting of set or get method for variable password in servlet.
how do I proceed

#3
wim DC

wim DC

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,084 posts
  • Programming Language:Java, JavaScript, PL/SQL
  • Learning:Java
Possible causes:
  • user doesn't have a "setPassword(String)" method. Please verify the method exists, and indeed takes a String as parameter
  • test.PasswordService.getInstance().encrypt(String) does not return a String. Please make sure the encrypt method takes a String, and returns a String.


#4
commissioner

commissioner

    Newbie

  • Members
  • PipPip
  • 17 posts
please can you illustrate with an example on how to set and return the string for variable password in servlet
thanks




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users