JSP Unterminated Tag With Nested OGNL

前端 未结 2 1850
野性不改
野性不改 2021-01-16 09:39

I have some OGNL I am using to populate the href element of an to a dynamically produced URL, handled by the Google UserService.

<         


        
相关标签:
2条回答
  • 2021-01-16 09:50

    Ah ok problem solved. Turns out the c:out wasn't needed to output the value of requestUri. It could simply be left as-is to be evaluated with the rest of the expression

    0 讨论(0)
  • 2021-01-16 10:07

    You cannot use JSP tags in Struts tag's attributes, but you can use OGNL there.

    Also note, that you can use OGNL only in Struts tag's attributes. And in most cases OGNL is executed once on the server, you shouldn't use nested OGNL or whatever you call it. May be this question will show you how to use you called nested OGNL.

    <s:set var="requestUri" value="%{#context['com.opensymphony.xwork2.dispatcher.HttpServletRequest'].requestURI}" />
    <s:a href="%{#action.userService.createLoginURL(#requestUri)}">Sign in</s:a>
    
    0 讨论(0)
提交回复
热议问题