在nutzbook里有一节加上了一个login.jsp,这一节:http://nutzbook.wendal.net/setup30mins/login_logout_jsp.html
里面有段代码:
var base = '${base}';
然后我啥也没取到,就是一个普通的文本: ${base} 所以我问下哪里问题....
是需要在哪里存么?
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
<filter>
<filter-name>nutz</filter-name>
<filter-class>org.nutz.mvc.NutFilter</filter-class>
<init-param>
<param-name>modules</param-name>
<param-value>net.wendal.nutzbook.MainModule</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>nutz</filter-name>
<url-pattern>/*</url-pattern>
<!-- ForwardView需要下面的配置 @Ok("->:/xxx/yyy/zzz") -->
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
</web-app>
头部改成这样
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
@wendal 问题解决了
但我还是听不解的,是不是我只要用nutz那么就可以在jsp页面使用${base}取出项目名?