Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9112535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:45:31+00:00 2026-06-17T03:45:31+00:00

I have this: <!– <div class=fieldcontain ${hasErrors(bean: azafataInstance, field: ‘localidad’, ‘error’)} required style=margin-left: 10px>–>

  • 0

I have this:

<!--   <div class="fieldcontain ${hasErrors(bean: azafataInstance, field: 'localidad', 'error')} required" style="margin-left: 10px">-->
<!--<label for="localidad">Localidad</label>    -->
<!--<g:if test="${params?.localidad }">-->
<!--<g:select id="localidad" title="${g.message(code: 'infoPersonal.localidad')}" name="localidad" value="${params?.localidad}" from="${[' ',params.localidad]}" noSelection="${['':message(code:'localidadSelect')]}" onClick="this.style.color='black'" onFocus="this.style.color='black'" style="max-width:168px" />-->
<!--</g:if>-->
<!--<g:else>-->
<!--<g:select id="localidad" title="${g.message(code: 'infoPersonal.localidad')}" name="localidad" value="${params?.localidad}" from="${['']}" noSelection="${['':message(code:'localidadSelect')]}" onClick="this.style.color='black'" onFocus="this.style.color='black'" style="max-width:168px"  />-->
<!--</g:else>-->
<!--</div>-->

As you can see… lines are commented. I run the project and i got this:

URI
/com.publidirecta.azafatas/azafataCertificada/registro_page
Class
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException
Message
Tag [else] cannot have non-whitespace characters directly preceding it.

Around line 95 of grails-app/views/azafataCertificada/registro.gsp

92:<!--<g:if test="${params?.localidad }">-->
93:<!--<g:select id="localidad" title="${g.message(code: 'infoPersonal.localidad')}" name="localidad" value="${params?.localidad}" from="${[' ',params.localidad]}" noSelection="${['':message(code:'localidadSelect')]}" onClick="this.style.color='black'" onFocus="this.style.color='black'" style="max-width:168px" />-->
94: <!--</g:if>-->
95: <!--<g:else>-->
96: <!--<g:select id="localidad" title="${g.message(code: 'infoPersonal.localidad')}" name="localidad" value="${params?.localidad}" from="${['']}" noSelection="${['':message(code:'localidadSelect')]}" onClick="this.style.color='black'" onFocus="this.style.color='black'" style="max-width:168px"  />-->
97:<!--</g:else>-->
98:<!--</div>-->

Trace

Line | Method
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   908 | run     in     ''
^   680 | run . . in java.lang.Thread

Caused by GrailsTagException: Tag [else] cannot have non-whitespace characters directly preceding it.
->>  95 | runTask in /grails-app/views/azafataCertificada/registro.gsp

The question is, obviously…
How is it possible, in a decent framework, can a commented line throw an exception!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T03:45:32+00:00Added an answer on June 17, 2026 at 3:45 am

    Because <!-- isn’t a comment in GSP.

    As you have discovered, the GSP parser treats HTML-style comments as normal content, to make it possible to generate output that contains HTML comments such as within script tags

    <script type="text/javascript><!--
    js goes here;
    //--></script>
    

    or IE conditional comments

    <!--[if IE 6]>
    <script type="text/javascript" src="${resource(dir:'css', file:'ie6-fixup.js')}"></script>
    <![endif]-->
    

    The syntax for GSP comments is

    <%-- this is commented out --%>
    

    the GSP parser will ignore anything inside this sort of comment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this form: <%= form_tag posts_path, :method => :get, :class => search_nav do
I have this class: Class B { private String D; private String E; }
Have this block: jQuery(document).ready(function($) { $(img[src$='.jpeg'], img[src$='.jpg'], img[src$='.png'], img[src$='.gif']).wrap('<div class=b-img/>').each(function() { var src =
I have this line: <xsl:when test=document('foo.xml')/field_config/field_rename/field[@old_name = $name]/@new_name> foo.xml: <field_config> <field_rename> <field old_name=Modified new_name=modification/>
have this code: template<typename T, template<typename, typename> class OuterCont, template<typename, typename> class InnerCont, class
I have this code in my fancybox script: <a href=# class=approve id=178>yes</a> When I
I have this class package net.omnosis.mazegame.components; import net.omnosis.mazegame.SlicedBitmap; import android.graphics.Bitmap; public class PlayerLayer extends
have this html: <div id=editable contentEditable=true > <span contentEditable=false >Text to delete</span> </div> need
Have this Ruby code: require 'openssl' require 'securerandom' class AuthRsa def initialize(public_key, private_key) @public_key
I have this class: public abstract class AbstractIncomingCall { /* class properties */ public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.