on 2020 Oct 02 3:49 AM
Hi All,
We are facing an issue for all tag files with when migrating from 1808 version to 2005v. We see this due to Spring version upgrdaed to 2005. Can we know how to mitigate this issue as this is occuring for large number of JSP file with <from> tag
Oct 01, 2020 9:07:22 PM org.apache.catalina.core.ApplicationDispatcher invoke INFO | jvm 1 | main | 2020/10/01 21:07:22.152 | SEVERE: Servlet.service() for servlet [jsp] threw exception INFO | jvm 1 | main | 2020/10/01 21:07:22.153 | org.apache.jasper.JasperException: /WEB-INF/tags/responsive/contact/contactUs.tag (line: [22], column: [6]) Unable to find setter method for attribute: [commandName] INFO | jvm 1 | main | 2020/10/01 21:07:22.153 | at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41) INFO | jvm 1 | main | 2020/10/01 21:07:22.153 | at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:291) INFO | jvm 1 | main | 2020/10/01 21:07:22.153 | at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:3005) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:3225) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2412) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1902) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1544) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2389) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2441) INFO | jvm 1 | main | 2020/10/01 21:07:22.154 | at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2447) INFO | jvm 1 | main | 2020/10/01 21:07:22.155 | at org.apache.jasper.compiler.Node$Root.accept(Node.java:470) INFO | jvm 1 | main | 2020/10/01 21:07:22.155 | at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2389) INFO | jvm 1 | main | 2020/10/01 21:07:22.155 | at org.apache.jasper.compiler.Generator.generate(Generator.java:3657) INFO | jvm 1 | main | 2020/10/01 21:07:22.155 | at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:254) INFO | jvm 1 | main | 2020/10/01 21:07:22.155 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:375) INFO | jvm 1 | main | 2020/10/01 21:07:22.155 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:351) INFO | jvm 1 | main | 2020/10/01 21:07:22.156 | at org.apache.jasper.compiler.Compiler.compile(Compiler.java:335) INFO | jvm 1 | main | 2020/10/01 21:07:22.156 | at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597) INFO | jvm 1 | main | 2020/10/01 21:07:22.156 | at org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:269) INFO | jvm 1 | main | 2020/10/01 21:07:22.156 | at org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:585) INFO | jvm 1 | main | 2020/10/01 21:07:22.156 | at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:49) INFO | jvm 1 | main | 2020/10/01 21:07:22.156 | at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:668) INFO | jvm 1 | main | 2020/10/01 21:07:22.157 | at
Request clarification before answering.
Hi ,
Thans for the update. I have followed the Spring version changes from 4.3 to 5.2.3 guidelines. In the Tag file we didnt use any command attribute .
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<c:url value="/j_spring_security_check" var="loginActionUrl"/>
<div> <c:url value="/j_spring_security_check" var="loginActionUrl" />
<form:form id="loginForm" action="${loginActionUrl}" method="post" novalidate="novalidate">
<div> <div>
<label for="j_username"> <spring:theme code="guest.email" /> </label>
<input id="j_username" name="j_username" aria-required="true" type="text" value="" placeholder="<spring:theme code="customer.review.guest.email.address.placeholder" />">
</div> </div> <div> <div>
<label for="j_password"> <spring:theme code="guest.pwd" /></label> <div>
<input id="j_password" name="j_password" class="form-control password js-password" aria-required="true" type="password" value="" placeholder="<spring:theme code="customer.review.adhoclogin.password.placeholder" />" autocomplete="off"> </div> </div> <i aria-hidden="true"></i> </div> <c:url value="/store/en/USD/login/pw/request" var="loginRequest" /> <div> <div>
<a href="${loginRequest}" class="js-password-forgotten forget-pwd" data-cbox-title="Reset Password"> <spring:theme code="login.link.forgottenPwd" /><span>
<spring:theme code="text.link.opens.modal" /></span> </a> </div> <div> <div> <label for="js-login-j_rememberMe">
<input id="js-login-j_rememberMe" name="j_rememberMe" type="checkbox"> <spring:theme code="login.remember.text" /></label> </div> </div> </div>
<div> <div> <div> <div> <label for="terms"> <input name="terms" id="terms" aria-required="true" type="checkbox"> <c:url var="terms_link" value='/terms-and-conditions' />
<spring:theme code="login.new.user.terms.text" arguments="${terms_link}" /> <input type="hidden" value=""> </label> </div> </div> </div> </div> <button type="submit" class="btn btn-default btn-block login-bt js-login-bt"> <spring:theme code="text.anonymous.login.button" /> </button> <div> <input type="hidden" name="CSRFToken" value="${CSRFToken}"> </div> </form:form> <div> <div> <a href="<c:url value='/register'/>"><spring:theme code="login.new.user.register.now" /></a> </div> <div> <a href="<c:url value='/privacy-policy'/>"><spring:theme code="login.new.user.privacy.text" /></a> </div> </div> </div>
Below Controller class method
@RequestMapping(value = "/register", method = RequestMethod.POST) @ResponseBody public String submitPartnerRegistration(@Valid final LeadGenerationForm leadGenerationForm, final BindingResult bindingResult, final HttpSession session) throws CMSItemNotFoundException { //code here }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
The commandName attribute was removed starting from spring 5 it was replaced by modelAttribute, therefore you must replace all occurences of commandName to modelAttribute.
More details can be found here : Upgrade steps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.