用.do访问页面就不用指定了。另外,text标签是在form中么?

解决方案 »

  1.   

    这个<html:base/>标签被用来在HTML代码中插入<base>元素,包含一个相对于主JSP页面绝对路径的锚点。允许你用做关联URL参考,胜于一个关联最近请求源的URL。这个<html:base>标签没有标志体并且支持单一属性的标志,被用来表示HTML的<base>标志的属性。应用这个<html:base/>标志,你只需要在HTML的顶部插入<html:base/>代码片段就可以了,
    (兄弟的翻译水平很差,希望楼上的能看的懂!:))
    The <html:base /> tag is used to insert an HTML <base> element, including an href pointing to the absolute location of the hosting JSP page. This allows you to use relative URL references, rather than a URL that is relative to the most recent requested resource. The <html:base /> tag has no body and supports a single attribute target, which represents the target attribute of the HTML <base> tag. To use the <html:base /> tag,you simply need to insert the tag, as shown in the following code snippet, at the top of your JSP:<html:base/><html:text/>标志是用在<html:form></html:form>标志内的,你提到的用name属性,是要取到一个名字为name值的session,这样才能够取的property的值,<bean:write/>也一样,都要先取得session的值才行。建议你看一下<<Mastering Jakarta Struts>>这本书
      

  2.   

    谢谢 yhanglxy(伊航) 
    那为什么我看到的例子一般都不指明name属性呢?