struts要配置xml,然后在web.xml配置struts的xml。
比如:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
说明将执行所有以.do 为结尾的跳转,LZ的xml配置好了吗?

解决方案 »

  1.   

    配置没问题的话
    <html:link page="/Visitors/SendLetterAction.do?method=searchold"></html:link>
    <a href="/Visitors/SendLetterAction.do?method=searchold>aaa</a>
    这样是可以的
      

  2.   

    同上
    http://www.blogcn.info/user1/toopen/
      

  3.   

    不是很明白楼上两位的回复,大概是我菜吧
    我的意思是
    <html:link page="/main?index=<%=index%>"></html:link>
    index 在JSP里定义的变量穿到Action 里
    <a href="../../src/com...action.MainAction?index=<%=index%>">aaa</a> 这样是可以的在游览器里是看的到传过去的值的比如index=1,但是这样好象传不到action里以前是传Servlet的
    相对路径绝对路径我都试过了不行现在用
    <html:link page="/main?index=<%=index%>"></html:link>
    游览器显示出url路径最后index=<%=index%>而没有读到JSP里的变量 
    是否有办法解决.
      

  4.   

    把index放在form的一个HashMap属性里面,然后link标签后面加上property="mapping"就可以了