javax.el.PropertyNotFoundException: Property ‘foo’ not found on type com.example.Bean

javax.el.PropertyNotFoundException: Property ‘foo’ not found on type com.example.Bean This literally means that the mentioned class com.example.Bean doesn’t have a public (non-static!) getter method for the mentioned property foo. Note that the field itself is irrelevant here! The public getter method name must start with get, followed by the property name which is capitalized at only … Read more

How to use with an tag?

<spring:url value=”/something” var=”url” htmlEscape=”true”/> <a href=”https://stackoverflow.com/questions/5007210/${url}”>…</a> But you an also use c:url <c:url value=”/something” var=”url”/> <a href=”https://stackoverflow.com/questions/5007210/<c:out value=”https://stackoverflow.com/questions/5007210/${url}”/>”>…</a> The one important difference between c:url and spring:url is, that c:url does not html encode the created url. But for a valid url the & between the url parameters must be a &amp;. So you need the … Read more

Include JSTL dependency with Maven

The dependencies mentioned above is not enough for me(using Tomcat 5.x as servlet container, which doesn’t provide JSTL implementation itself). It just imports the according JSTL interface package into project, and will cause a runtime error in Tomcat. Here is the dependency part used in my project, hopefully can help others out. The hardest part … Read more

difference between eq and == in JSP

eq exists (as well as ne, lt, etc) so you can avoid using XML entity references (< is an XML character and would need to be escaped as &lt;, for example), but they do the same thing. See Comparison operators in JSP for more info.

Where are compiled JSP Java (*__jsp.java) files?

The compiled JSP files are by default available in the /work folder of the Tomcat environment. There should be a subfolder Catalina which in turn has a subfolder representing the domain name which defaults to localhost. There in turn should be the project folder which in turn contains package hierarchy org.apache.jsp with therein the compiled … Read more

How to add JSTL to Maven?

You must include the jstl library in your distribution. This may be provided by the container, although that is not recommended practice. The maven dependency for the current version (as of writing) is here: <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> Although, it’s always worth checking the maven central repository for updates.

JSTL iterate over list of objects

There is a mistake. See this line <c:forEach items=”${myList}” var=”element”>. ${} around ‘myList’ was missing. <c:forEach items=”${myList}” var=”element”> <tr> <td>${element.status}</td> <td>${element.requestType}</td> <td>${element.requestedFor}</td> <td>${element.timeSubmitted}</td> </tr> </c:forEach>

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