Announcement Announcement Module
Collapse
No announcement yet.
<spring:eval tag + Getting exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <spring:eval tag + Getting exception

    Hi All,
    I am using <spring:eval expression="@mainController.removeTags('${location }')" var="cleanLocation"/>l in jsp file and in any case getting following error

    org.springframework.expression.spel.SpelParseExcep tion: EL1046Epos 60): Cannot find terminating for string
    at org.springframework.expression.spel.standard.Token izer.lexQuotedStringLiteral(Tokenizer.java:220)
    at org.springframework.expression.common.TemplateAwar eExpressionParser.parseExpression(TemplateAwareExp ressionParser.java:56)
    at org.springframework.web.servlet.tags.EvalTag.setEx pression(EvalTag.java:77)
    at jsp_servlet._web_45_inf._views.__results._jsp__tag 6(__results.java:743)
    at jsp_servlet._web_45_inf._views.__results._jspServi ce(__results.java:272)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java: 34)
    at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:242)
    at weblogic.servlet.internal.StubSecurityHelper$Servl etServiceAction.run(StubSecurityHelper.java:216)

    My JSP name is result.jsp file.
    Can anyone explain plz, why i am getting this exception?

  • #2
    Wasim,

    This is too little information for anyone to suggest what might be wrong in here. At the outset, I think there's this problem cause you're mixing JSTL & Spel expression together in JSP, but I might be wrong cause of lack of information. Have you tried putting a breakpoint in your mainController class on the method removeTags and verified that your method is being called? Have you tried replacing the JSTL expression '${location }' with EL expression '#{location}'? What is it that you're trying to achieve? Please provide more info.

    Comment


    • #3
      Hi .. Thanks for reply..
      Actually i am using following code and getting this exception... So i want to know what is the wrong in this code. My application is running without any problem... But in server log i am getting this error.
      Plz find the code.
      Code:
      	<spring:eval expression="@mainController.removeTags('${location}')" var="cleanLocation"/>
      		
      		<input type="hidden" id="product" name="product" value='<spring:escapeBody htmlEscape="true">${param.pt}</spring:escapeBody>'/>
      		<input type="hidden" id="lat" name="lat" value='<spring:escapeBody htmlEscape="true">${param.lat}</spring:escapeBody>'/>
      		<input type="hidden" id="lon" name="lon" value='<spring:escapeBody htmlEscape="true">${param.lon}</spring:escapeBody>'/>
      And error is
      Code:
      ####<Dec 10, 2012 4:01:22 AM GMT+00:00> <Error> <HTTP> <nwk-gcrmp-lapp21.corp.apple.com> <grlp04> <[ACTIVE] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <3b2d3421437ffd27:-1202027d:13af76e630c:-8000-000000000056bc53> <1355112082410> <BEA-101017> <[ServletContext@413381076[app:GRL-morningStar module:GRL-morningStar-SNAPSHOT.war path:null spec-version:3.0 version:1-Dec-2012_11PM_PST]] Root cause of ServletException.
      org.springframework.expression.spel.SpelParseException: EL1046E:(pos 27): Cannot find terminating  for string
      	at org.springframework.expression.spel.standard.Tokenizer.lexQuotedStringLiteral(Tokenizer.java:220)
      	at org.springframework.expression.spel.standard.Tokenizer.process(Tokenizer.java:183)
      	at org.springframework.expression.spel.standard.Tokenizer.<init>(Tokenizer.java:47)
      	at org.springframework.expression.spel.standard.InternalSpelExpressionParser.doParseExpression(InternalSpelExpressionParser.java:110)
      	at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:56)
      	at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:1)
      	at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:66)
      	at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:56)
      	at org.springframework.web.servlet.tags.EvalTag.setExpression(EvalTag.java:77)
      	at jsp_servlet._web_45_inf._views.__results._jsp__tag6(__results.java:743)
      	at jsp_servlet._web_45_inf._views.__results._jspService(__results.java:272)
      	at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
      	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
      	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
      	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
      	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
      	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
      	at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:564)
      	at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:263)
      	at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
      	at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
      	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
      	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
      	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
      	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
      	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
      	at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
      	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
      	at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
      	at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      	at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
      	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)
      	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
      	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      	at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      	at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      	at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
      	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
      	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
      	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
      	at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
      	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      	at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

      Comment


      • #4
        The value of ${location} has a quote character inside it. You have to escape that quote character in here.

        But this should be pretty obvious looking at the error. Are you posting to the Spring forum without doing enough debugging at your end? You should check at your end first before posting.

        Comment

        Working...
        X