Wednesday, July 16, 2014

Eclipse, javax.servlet.http cannot be resolved to a type

So, in StinkEclipse, editing a WebApplication, in a JSP you make a reference to javax.servlet.http.HttpServletRequest and you get a red "javax.servlet.http cannot be resolved to a type".

I guess this is because even in 2014 they maintain this stupid division between JSE and JEE, making your life so miserable. So HTTP is part of JEE and not available by default. Why this, I guess to save a few bytes. Morons.

This is the solution in 3 steps

in the Eclipse Windows Preferences



in your project properties





Guys at Eclipse, this is really a friendly advice, have you considered some other hobby, like knitting, or bicycle repair? At least you would not do so much damage to the developers community... and leave IDE development to the real pros, like IntelliJ or Netbeans people...

No, wait, a failed bike repair could kill someone.... better if you stick to IDEs...



No comments: