Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Problema na chamada da função

Alguém pode me ajudar pessoal, quando eu dou o "commandName = "produto"", o IJ diz que eu preciso declarar um variável externa na anotação "command".

HTTP Status 500 – Internal Server Error
Type Exception Report

Message An exception occurred processing [/WEB-INF/views/produtos/form.jsp] at line [23]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.apache.jasper.JasperException: An exception occurred processing [/WEB-INF/views/produtos/form.jsp] at line [23]

20: </head>
21: <body>
22: 
23:     <form:form action="${ s:mvcUrl('PC#gravar').build() }" method="post" commandName="produto">
24:         <div>
25:             <label>Título</label>
26:             <form:input path="titulo" />


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:626)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:515)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
    org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:172)
    org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1228)
    org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1011)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:955)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

Root Cause

javax.el.ELException: Problems calling function [s:mvcUrl]

Root Cause

java.lang.IllegalArgumentException: Mapping mappingName not found: PC#gravar
1 resposta
solução!

Galera, problema resolvido. O método "Grava" estava errado.