下面是jsp代码
<ul class="nav pull-right">
<s:if test="%{curUser != null}">
<li class="dropdown">
<a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">%{curUser.userName}<b class="caret"></b></a>
<ul class="dropdown-menu">
<s:if test="%{curUser.admin eq true}">
<li><a href="/admin" title="Admin Section"><i class="icon-certificate"></i> Admin</a></li>
</s:if>
<li><a href="/user/%{curUser.userName}" title="%{curUser.userName}'s Profile"><i class="icon-user"></i> Profile</a></li>
<li><a href="/user/profile.html?action=edit"><i class="icon-cog"></i> Edit Profile</a></li>
<li><a href="/login.html?action=logout"><i class="icon-off"></i> Sign out</a></li>
</ul>
</li>
</s:if>
<s:else>
<li><a href="/login">Login</a></li>
<li class="divider-vertical"></li>
<li><a href="/signup">Sign Up</a></li>
</s:else>
</ul>
我收到这个错误。需要帮助。
org.apache.jasper.JasperException: An exception occurred processing JSP page /decorators/base.jsp at line 45
42: </a></li>
43: </ul>
44: <ul class="nav pull-right">
45: <s:if test="%{curUser != null}">
46: <li class="dropdown">
47: <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">%{curUser.userName}<b class="caret"></b></a>
48: <ul class="dropdown-menu">
这是我的 web.xml 配置-我猜问题是使用带有站点网格的 Struts 标签。
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>LoginCheckFilter</filter-name>
<filter-class>com.tutorial.filter.LoginCheckFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>LoginCheckFilter</filter-name>
<url-pattern>/admin</url-pattern>
<url-pattern>/admin/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<init-param>
<param-name>logLevel</param-name>
<param-value>WARN</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<init-param>
<param-name>actionPackages</param-name>
<param-value>com.tutorial.action</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>
</listener>