<html:link>标签用法:带变量参数的属性链接http://www.javawebstudio.com/bbs/dispbbs.asp?boardid=8&id=349&star=1#349

解决方案 »

  1.   

    (2)然后第二个问题:在javascript里面用到<script language="javascript">
    function onfunc() {
         document.location.href = "/DemoAction?some=true";
    }
    </script>这时候 Struts 有没有提供方法可能得到 当前应用 /DemoApp 的路径的?效果如:<script language="javascript">
    function onfunc() {
         document.location.href = "/DemoAction?some=true";
    }
    </script>这个可否实现?
      

  2.   

    错了:改为“document.location.href = "/DemoApp/DemoAction?some=true";”
      

  3.   

    <html:link>标签用法:带变量参数的属性链接<html:link action="/html-link" paramId="stringProperty" paramName="newValue">
         String via paramId and paramName
         </html:link>
    <html:link action="/html-link"  name="newValues">
           Float, int, and stringArray via name (Map)
         </html:link>
    <html:link action="/html-link" paramId="booleanProperty" paramName="testbean" paramProperty="nested.booleanProperty" module="/exercise">
           Boolean via paramId, paramName, and paramValue (module)
         </html:link>