Boa tarde Joinson!
Cara, fiz uma pequena mudança no código que vc postou...
De => ${produto.promocao == N'
Para => ${produto.promocao == 'N'
Mas ao testar o browser gerou o erro:
GET http://localhost:8080/nome-do-projeto/produto/atualizaVaz?id=1 net::ERR_INCOMPLETE_CHUNKED_ENCODING
E no console:
Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/produto/formVaz.jsp at line 229
226: <div class="col-md-1">
227: <label>Promoção:</label>
228: <select name="produto.promocao" id="promocao" class="form-control" data-select="sl" data-url="sl">
229: <option value="S" ${produto.promocao == 'S' ? 'selected' : ''} >Sim</option>
230: <option value="N" ${produto.promocao == 'N' ? 'selected' : ''} >Não</option>
231: </select>
232: </div>
Alterei o código para:
<label>Promoção:</label>
<select name="produto.promocao" id="promocao" class="form-control" data-select="sl" data-url="sl">
<option value="S" ${produto.promocao eq "S" ? "selected" : ""} >Sim</option>
<option value="N" ${produto.promocao eq "N" ? "selected" : ""} >Não</option>
</select>
E no browser gerou o mesmo erro:
GET http://localhost:8080/nome-do-projeto/produto/atualizaVaz?id=1 net::ERR_INCOMPLETE_CHUNKED_ENCODING
E no console o erro ficou:
Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/produto/formVaz.jsp at line 229
226: <div class="col-md-1">
227: <label>Promoção:</label>
228: <select name="produto.promocao" id="promocao" class="form-control" data-select="sl" data-url="sl">
229: <option value="S" ${produto.promocao eq "S" ? "selected" : ""} >Sim</option>
230: <option value="N" ${produto.promocao eq "N" ? "selected" : ""} >Não</option>
231: </select>
232: </div>
Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at br.com.caelum.vraptor.core.DefaultStaticContentHandler.deferProcessingToContainer(DefaultStaticContentHandler.java:87)
at br.com.caelum.vraptor.core.DefaultStaticContentHandler$Proxy$_$$_WeldClientProxy.deferProcessingToContainer(Unknown Source)
at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:114)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:726)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:394)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:311)
at br.com.caelum.vraptor.view.DefaultPageResult$1.intercept(DefaultPageResult.java:135)
... 82 more
Caused by: javax.el.ELException: Cannot convert S of type class java.lang.String to class java.lang.Long
at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:405)
at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:384)
at org.apache.el.lang.ELSupport.equals(ELSupport.java:178)
at org.apache.el.parser.AstEqual.getValue(AstEqual.java:39)
at org.apache.el.parser.AstChoice.getValue(AstChoice.java:44)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184)
at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:944)
at org.apache.jsp.WEB_002dINF.jsp.produto.formVaz_jsp._jspService(formVaz_jsp.java:424)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
... 100 more