今天在做struts的时候,碰到java.lang.NullPointerException: Module 'null' not found这个错误,郁闷了半天,
原来是web.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,
/ WEB - INF / struts - config2.xml
</ param - value >
</ init - param -->
< init - param >
< param - name > config </ param - name >
< param - value >/ WEB - INF / struts - config.xml
</ param - value >
</ init - param >
< load - on - startup > 2 </ load - on - startup >
</ 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,
/ WEB - INF / struts - config2.xml
</ param - value >
</ init - param -->
< init - param >
< param - name > config </ param - name >
< param - value >/ WEB - INF / struts - config.xml
</ param - value >
</ init - param >
< load - on - startup > 2 </ load - on - startup >
</ servlet >
加上就好了,大家如果有出现这种问题,可以按这种方法试试!换了eclipse真是不方便,又找不到3.1.2 的struts插件真是不方便,还是觉得jbuilder好...