Sunday, July 15, 2007

Debugging Struts Information

Some time ago I posted an article about debugging information in a JSP page. Struts tags have an interesting tag with almost the same functionality I wrote before.

It is very simple to use. All you need, is add the tag below to your code, provided all the jstl information are correct (in web.xml and/or standard.jar and/or jstl.jar).


<%@ taglib prefix="s" uri="/struts-tags" %>
...
<s:debug/>

Choose Java Version for Maven compile

It is possible to set the version of the jdk one wants to use when compiling code using maven.

This might be mandatory if your code uses generics or annotations. So here is the code you should add to your pom.xml.


<build>
...
 <plugins>
...
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
     <source>1.5</source>
     <target>1.5</target>
    </configuration>
   </plugin>
 </plugins>
...
</build>
...