• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The method isEmpty() is undefined for the type String

 
Paul Featherstone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm developing a simple login form using jsp and a servlet which performs some basic validation/authentication prior to redirecting to the home.jsp page. I am having issues and have stripped the servlet right back to basics but am still getting the same error message:

The method isEmpty() is undefined for the type String

I know that this exception is caused by use of isEmpty without the having 1.6 jre (I have 1.5 on my mac) but I have now completely removed any mention of the isEmpty method so how can the same exception be thrown? I had previously tried using StringUtils.isEmpty(String)..nothing seems to make any difference, when the form is posted it always throws the same exception, sure it's something silly (as ever!!).

I have substituted a simple validation script I found on another thread on the forum to see if it solved the problem..anyway, here is the code as it currently stands (routing login.jsp via LoginServlet.java)..



Any pointers would be much appreciated. Thanks for your help in advance.

Regards,
Paul
 
Jessid Leon Velez Gutierrez
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Pol. I think I have had some problems (using Netbeans and tomcat) like the one you are having. I have solved that in a very.... rude or whatever you want to call it: I delete the tomcat directory and after that re-unzip it.

Reggards
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65335
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely the class file for the changed servlet hasn't been updated, or the app hasn't been restarted.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic