IDP, pre-compiling jsp's
Steven Carmody
steven_carmody at brown.edu
Fri Jul 11 16:43:29 EDT 2014
Hi,
I know this isn't strictly a Shibboleth question, but I'm hoping someone
has been down this road, and may have some advice.
I'm exploring changing some of the contents of logout.jsp. We're looking
to take advantage of the work done by Kaspar Brand of Switch, and
provide users with more a informative logout page:
[JIRA] (SIDP-600) Make the inbound message issuer (SP's entity ID)
available to logout.jsp
Dealing with JSP and identifying where syntax errors are is such fun,
tho, that I've started exploring pre-compiling the JSP pages in an
attempt to get useful error messages. I've modified the
java-shib-idp2-main/java-idp/pom.xml file
adding these two maven plugins:
<groupId>org.codehaus.mojo.jspc</groupId>
<artifactId>jspc-maven-plugin</artifactId>
<version>2.0-alpha-3</version>
<groupId>org.codehaus.mojo.jspc</groupId>
<artifactId>jspc-compiler-tomcat6</artifactId>
<version>2.0-alpha-3</version>
to pre-compile the jsp pages included with the IDP when compiling the
IDP src. This actually seems to work.
I'm compiling on linux, at the command line, using maven. (I haven't
gotten these plugins to work successfully with eclipse on my OS X desktop.)
Unfortunately, compiling the distributed src is already producing
helpful error msgs -- logout.jsp is failing with these msgs:
ERROR] An error occurred at line: 32 in the jsp file: /logout.jsp
[ERROR] Syntax error, 'for each' statements are only available if source
level is 5.0
[ERROR] 29: %>
[ERROR] 30:
[ERROR] 31: <ul>
[ERROR] 32: <% for (ServiceInformation info :
s.getServicesInformation().values()) { %>
[ERROR] An error occurred at line: 32 in the jsp file: /logout.jsp
[ERROR] Can only iterate over an array or an instance of java.lang.Iterable
[ERROR] 29: %>
[ERROR] 30:
[ERROR] 31: <ul>
[ERROR] 32: <% for (ServiceInformation info :
s.getServicesInformation().values()) { %>
the msg "Syntax error, 'for each' statements are only available if
source level is 5.0" seems to say that I'm compiling with a jdk of 1.4
or older. That surprises me, since:
$ ls -al /usr/java
total 16
drwxr-xr-x 3 root root 4096 Jan 23 12:53 .
drwxr-xr-x 16 root root 4096 Jan 23 12:53 ..
lrwxrwxrwx 1 root root 16 Jan 23 12:53 default -> /usr/java/latest
drwxr-xr-x 9 root root 4096 Jan 23 12:53 jdk1.6.0_31
lrwxrwxrwx 1 root root 21 Jan 23 12:53 latest -> /usr/java/jdk1.6.0_31
Any and all suggestions appreciated ! I'm just trying to get to the
point where I can see the error msgs when JSP pages fail to compile.
Thanks!
More information about the users
mailing list