• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

The method isEmpty() is undefined for the type String

 
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
 
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
 
Marshal
Posts: 67478
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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.
 
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic