about greg
outofmemory: greg's blog
projects


Archive for November, 2008

Ganymede JSP Validation Issue

Friday, November 14th, 2008

Yesterday I had a heck of a time trying to figure out my my JSPs weren’t passing validation since I upgraded Ganymede from 3.4.0 to 3.4.1. There was a consistent issue where the JSP Validation did not like my scriptlet code, even when I dumbed it down to try even the simplest scriptlet. The validation errors looked like:

Syntax error on token "}", delete this token
Syntax error on token "catch", Identifier expected
Syntax error, insert "Finally" to complete TryStatement

I actually found out what my problem was through the Eclipse Web Tools usergroup. The issue for me was the use of the Spring form custom tag library. If you self-close the tag…

<form:errors path="*" />

…then you get the goofy JSP validation error. If you close the tag as if there was body content…

<form:errors path="*"></form:errors>

Then the error goes away. I need to follow-up with a bug for the Ganymede team.

Subclipse Tip on svn:keywords

Thursday, November 6th, 2008

Keywords in SVN are used to insert dynamic information about a file, into the file, presumably in a comment header.  The SVN manual discusses keywords, however when I was configuring my repository and eclipse projects, I had trouble getting them to update on commit.  I found a blog entry that discussed the keywords property in the server configuration, so I hopped on my server and set up the configuration accordingly.  I restarted the service and commited a file with the following header:

/**
 * @version svn:$Id$
 */

After the commit, the file did not update as expected. I did some further digging and found a forum post that discussed another option where you set the property on the file. So I experimented with that using the Team > Set Property … command in eclipse on a single file. Setting the property name to svn:keywords and value to Id. I made a simple change to my file and committed it again. Voila! It worked.

The last step was to apply this keyword to all of my files…and preferably not manually. The answer was to go to the root of my project and set the property there, noting to check the Set property recursively check box. If I want to add more keywords later on, I can by going to the root, modifying the svn:keywords property by adding other keywords (refer to the manual again) separated by a single space.