struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Al Sutton" <>
Subject Re: JSP syntax errors through icnlude
Date Mon, 14 Jan 2008 13:18:47 GMT
First question;

Why do you think this is a Struts bug?

I encountered the same problem when I upgraded from Eclipse 3.2 to 3.3 
without changing the project. Have you tried downgrading your version of 
Eclipse to see if that resolves the problem?, have you also tried compiling 
and testing the project in an servlet engine?, have you also tried running a 
"Clean..." on your server within Eclipse and separately a Clean on all the 
projects in your workspace to ensure there isn't anything left from a 
previous version of your app?


----- Original Message ----- 
From: "Maxx" <>
To: "Struts Users Mailing List" <>
Sent: Monday, January 14, 2008 11:17 AM
Subject: JSP syntax errors through icnlude


Before issuing a bug report on Struts' bug tracker, I'd like to have
your advices about a rather stranger syntax error I'm getting with
Eclipse (v.3.3/Europa) and JSP using Struts2 tags.

Here's own I can reproduce it:

Create the project: New Project > Other... > Web > Dynamic Web Project
 => Project Name: Struts2Test
 => Other settings: use default

Add Struts2 needed librairies (e.g. struts2-core-j4-2.0.11.jar &
xwork-j4-2.0.4.jar ) to your
WebContent\WEB-INF\lib folder

Now creating the test *.jsp(f) files under WebContent:

/pages/action/index.jsp: (please respect the folders!!)
<%@page language="java" contentType="text/html; charset=ISO-8859-1"%>
<%@taglib prefix="s" uri="/struts-tags"%>

<%@include file="/pages/include/include.jspf"%>

/pages/include/include.jspf: (folders too!)
<%@taglib prefix="s" uri="/struts-tags"%>

<%-- Affichage des éventuels messages d'information ou d'erreur --%>
<s:if test="actionMessages != null && actionMessages.size > 0 ||
actionErrors != null && actionErrors.size > 0">
<div class="content">
<s:if test="actionMessages != null && actionMessages.size > 0">
<div id="actionMessages" class="actionMessages">
<s:actionmessage cssClass="actionMessage" theme="fix" />
<s:if test="actionErrors != null && actionErrors.size > 0">
<div id="errorMessages" class="errorMessages">
<s:actionerror cssClass="errorMessage" theme="fix" />

Now clean & build your project:
you'll get two Syntax ERRORs on the <%@include...%> JSPF row in the 

Multiple annotations found at this line:
- Syntax error on token "catch", Identifier expected
- Syntax error on token "}", delete this token

I first thought it could be due to the <s:actionmessage> &
<s:actionerror> tags not handling properly exceptions.
But as there's seem to have no syntax error when putting both files
(JSP & JSPF) in the same folder, I'm getting dubious.

This code works, these pages work (I compiled & used them on Tomcat
4.x & WebLogic 8.x)!! So what's the problem with the validation (JSP
Syntax validator)?
Any idea..?

Thanks in advance...

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message