You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john lee <sh...@yahoo.com> on 2013/05/28 18:56:07 UTC

struts2 s:button


<%@ taglib prefix="s" uri="/struts-tags"%>

<table>
<tr><td colspan="2">
  <s:if test='%{#session.PERSON != null}'>
     <s:button value="LogOff" action="LogoffAction">
     </s:button>
  </s:if>
  <s:else if test='%{#session.PERSON ==null}'>
     <s:button value="Login" action="LoginAction">
     </s:button>
  </s:else if>
</td></tr>
</table>

but when test, in the logfile, giving the error

SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /PageMenu.jsp (line: 7, column: 5) No tag "button" defined in tag library imported with prefix "s"
        at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
        at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
        at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
        at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1215)

i check the reference, s:button is valid, if so, why not receive the error at above

please advise 

john

Re: struts2 s:button

Posted by Dave Newton <da...@gmail.com>.
Checked which reference?


On Tue, May 28, 2013 at 12:56 PM, john lee <sh...@yahoo.com> wrote:

>
>
> <%@ taglib prefix="s" uri="/struts-tags"%>
>
> <table>
> <tr><td colspan="2">
>   <s:if test='%{#session.PERSON != null}'>
>      <s:button value="LogOff" action="LogoffAction">
>      </s:button>
>   </s:if>
>   <s:else if test='%{#session.PERSON ==null}'>
>      <s:button value="Login" action="LoginAction">
>      </s:button>
>   </s:else if>
> </td></tr>
> </table>
>
> but when test, in the logfile, giving the error
>
> SEVERE: Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: /PageMenu.jsp (line: 7, column: 5) No
> tag "button" defined in tag library imported with prefix "s"
>         at
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
>         at
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
>         at
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
>         at
> org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1215)
>
> i check the reference, s:button is valid, if so, why not receive the error
> at above
>
> please advise
>
> john




-- 
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>