The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

Get rid of any servletcontainer-specific libraries such as jsp-api.jar in your /WEB-INF/lib folder. This exception indicates that you’ve put servletcontainer-specific libraries of a container which supports only Servlet 2.4 / JSP 2.0 or older in there (the getJspApplicationContext() method was introduced in Servlet 2.5 / JSP 2.1). This is a major mistake. Those libraries don’t … Read more

Expression Language in JSP not working [duplicate]

I’m quoting from an answer I provided before to the problem of EL not working: With other words, the EL expression doesn’t get evaluated? That can have one or more of the following causes: Application server in question doesn’t support JSP 2.0. The web.xml is not declared as Servlet 2.4 or higher. The @page is … Read more

Using for loop inside of a JSP

You concrete problem is caused because you’re mixing discouraged and old school scriptlets <% %> with its successor EL ${}. They do not share the same variable scope. The allFestivals is not available in scriptlet scope and the i is not available in EL scope. You should install JSTL (<– click the link for instructions) … Read more

JSP vs Velocity what is better?

@Vartec: I don’t think that the “strict separation of view from business logic” is a velocity feature that is not present in jsp. You can do business logic in jsp (more or less) but it’s not recommended at all. But I agree in your point regarding the syntax. Performance JSP is compiled to Java, so … Read more

Side effect–what’s this?

A side effect is anything a method does besides computing and returning a value. Any change of instance or class field values is a side effect, as is drawing something on the screen, writing to a file or a network connection. Strictly speaking, a “function” is defined as not having side effects – which is … Read more

How to avoid using scriptlets in my JSP page?

I think it helps more if you see with your own eyes that it can actually be done entirely without scriptlets. Here’s a 1 on 1 rewrite with help of among others JSTL (just drop jstl-1.2.jar in /WEB-INF/lib) core and functions taglib: <%@ taglib uri=”http://java.sun.com/jsp/jstl/core” prefix=”c” %> <%@ taglib uri=”http://java.sun.com/jsp/jstl/functions” prefix=”fn” %> <html> <head> <title>My … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)