<html:link action="/entersubject" paramId="_field" paramName="field">
......
</html:link>
paramId的值看你的需要。
action="/entersubject.do" 应该是错的,<html:link />转化为<a />后会自动将链接加上context prefix和.do的。

解决方案 »

  1.   

    Saro(三生):您好    我是这样写的:
               <html:link action="/entersubject" paramId="field" paramName="field" paramProperty="name">
               <bean:write name="field" property="name" />
               </html:link>Action里:String fieldName = (String)request.getParameter( "field" );其中field是javabean,name是field的一个字段,tomcat提示在任何scope内找不到field。
    执行这个request的时候field已经释放了,但field也不能放在session中,它也是从logic:iterate中取出的,这如何处理?再次谢谢
      

  2.   

    上面一个地方写错了,是说fields这个Bean没找到在任何scope内,fields是个ArrayList,field是其中的对象,在得到这个页面的Action中我把fields放到了request中了。
      

  3.   

    如果fields是个ArrayList,field是其中的对象,你应该在logic:iterate中指定type
      

  4.   

    谢谢楼上的。现在是我修改后,在那个<html:link>上点击,执行action="/entersubject"时,说找不到Fields,因为Fields放在了request里。
      

  5.   

    这是写的BLOG的一段代码:
    <logic:iterate id="logshow" name="Log" type="my.simbas.blog.bean.logContext"
    indexId="index">
    <c:if test="${index<5}">
    <div class="entry" id="a000033">
    <h2>
    <html:link action="blogshow" paramName="logshow" paramProperty="log_ID" paramId="logID">
    ${logshow.log_Title}
    </html:link>
    </h2>
    <p>
    ${logshow.log_Intro}
    </p>
    </div>
    </c:if>
    </logic:iterate>
    我的BEAN也是放在ArrayList和request中的,没有问题
      

  6.   

    你说的type是Field这个Bean的类吧?我加了,还是说找不到fields
      

  7.   

    simbas00(我是被诅咒了!我微笑着,享受这痛苦生活带来的仅有快乐):
            你好,可否把你的Action部分代码也贴出来,<logic:iterate id="logshow" name="Log" type="my.simbas.blog.bean.logContext" indexId="index">中“Log”是不是放在request中传过来的,logshow是本页面范围内标识Log集合中的Bean?