5 Replies Latest reply on Apr 15, 2010 5:08 PM by Matthew Robinson

    JSP Validator gives errors if scriptlets are used

    Matthew Robinson Newbie

      Hello All,

      I have just installed Eclipse Gallileo and the JBOSS Eclipse toolkit, and imported my Struts 1.2 project, which is fully functional and works fine without the JBOSS Eclipse toolkit.

       

      No Errors are reported in the 'Problems' view, but I get errors when I attempt to run my website.  When I view the JSP code in question, I see errors such as:

       

      Syntax error on token(s), misplaced construct(s) on the word 'function' in a <script> tag within the JSP:

       

      <script type="test/javascript">

      <!--

      function showLocation<%= location %>Banners() {

      ...

      </script>

       

      As you can see, the function name includes a scriptlet tag whereby the name includes the content of the location variable, which is created using a bean:define tag:

       

      <bean:define id="location" name="banner:location" scope="request" type="java.lang.String" />

       

      Once I remove the <%= location %> tag from the function name, the error goes away.

       

      How may I configure the validator to correctly parse this file?

       

      Kind regards,

      Matt.