NullPointerException是运行错误啊,怎么会在编译时跑出呢?到底是哪里出错啊?

解决方案 »

  1.   

    如果是那个  <title> /input.jsp </title> 若的祸,
    那么岂不是发现了个 JSP  Bug ?  ^_^ .
      

  2.   

    <html:submit property="submit" value="Submit"/> 将property="submit" 去掉, 你的ActionForm没有submit
      

  3.   

    property里的值跟你的FormBean里的字段没有对应上
      

  4.   

    确实是比较初级的 问题 !
    把struts-config.xml贴出来??
      

  5.   

    根据错误提示,错误应该在页面里,跟struts-config.xml无关
      

  6.   

    空指针,是你某个地方使用了某个值,而这个值没有内容是null。可能是你一上来就action.do,在get值的时候,jsp页面那些地方是null,所以才会出错。
      

  7.   

    <html:submit property="submit" value="Submit"/>把property属性去掉.
    <title> /input.jsp </title>这样写很别扭.不如写在资源文件<bean:message>导入呢
      

  8.   

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
        <form-bean name="myActionForm" type="strutsdemo.myActionForm" />
      </form-beans>
      <global-forwards>
        <forward name="input" path="/input.jsp" />
      </global-forwards>
      <action-mappings>
        <action input="/input.jsp" name="myActionForm" path="/myAction" scope="session" type="strutsdemo.myAction" validate="false" />
      </action-mappings>
      <plug-in className="org.apache.struts.tiles.TilesPlugin">
        <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
      </plug-in>
      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
        <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
      </plug-in>
    </struts-config>