The import javax.servlet can’t be resolved 

You need to add the Servlet API to your classpath. In Tomcat 6.0, this is in a JAR called servlet-api.jar in Tomcat’s lib folder. You can either add a reference to that JAR to the project’s classpath, or put a copy of the JAR in your Eclipse project and add it to the classpath from there. If you want … Read more

org.apache.jasper.JasperException

when i open first time website its show error like this but if i refresh then site will open perfectly but if u leave idle sometime then if u open next then also same error after that if u refresh then site open perfect this is the problem, its applying in entire application in any … Read more

What is the difference between JSF, Servlet and JSP?

JSP (JavaServer Pages) JSP is a Java view technology running on the server machine which allows you to write template text in client side languages (like HTML, CSS, JavaScript, ect.). JSP supports taglibs, which are backed by pieces of Java code that let you control the page flow or output dynamically. A well-known taglib is JSTL. JSP also supports Expression … Read more

java.lang.IllegalStateException: Cannot (forward | sendRedirect | create session) after response has been committed

A common misunderstanding among starters is that they think that the call of a forward(), sendRedirect(), or sendError() would magically exit and “jump” out of the method block, hereby ignoring the remnant of the code. For example: This is thus actually not true. They do certainly not behave differently than any other Java methods (expect … Read more