您的位置:程序门 -> java -> intellij idea



我的struts问题,有没有人能解决啊,我问了好多人都没能解决


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


我的struts问题,有没有人能解决啊,我问了好多人都没能解决
发表于:2007-04-10 22:22:22 楼主
我的struts标志库怎么都用不起,像什么struts-html,struts-bean,怎么回事,他总是提示

stacktrace:
org.apache.jasper.servlet.jspservletwrapper.handlejspexception(jspservletwrapper.java:506)
org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:395)
org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:314)
org.apache.jasper.servlet.jspservlet.service(jspservlet.java:264)
javax.servlet.http.httpservlet.service(httpservlet.java:802)


root   cause  

java.lang.nullpointerexception:   module   'null '   not   found.
org.apache.struts.taglib.tagutils.getmoduleconfig(tagutils.java:755)
org.apache.struts.taglib.tagutils.computeurlwithcharencoding(tagutils.java:364)
org.apache.struts.taglib.tagutils.computeurlwithcharencoding(tagutils.java:285)
org.apache.struts.taglib.bean.includetag.dostarttag(includetag.java:175)
org.apache.jsp.setsolution_jsp._jspservice(setsolution_jsp.java:70)
org.apache.jasper.runtime.httpjspbase.service(httpjspbase.java:97)
javax.servlet.http.httpservlet.service(httpservlet.java:802)
org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:334)
org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:314)
org.apache.jasper.servlet.jspservlet.service(jspservlet.java:264)
javax.servlet.http.httpservlet.service(httpservlet.java:802)

到底是什么问题,我实在无能为力了,我已经在这上面不知道浪费多少时间了,有人能帮我一下吗
发表于:2007-04-10 22:25:111楼 得分:0
贴出代码看看先,包括各种支持文件
发表于:2007-04-12 13:15:392楼 得分:0
这是jsp,试试标签能不能用只是,不过还是出现上面的提示

<%--
    created   by   intellij   idea.
    user:   wgg
    date:   2007-4-5
    time:   20:12:43
    to   change   this   template   use   file   ¦   settings   ¦   file   templates.
--%>
<%@   page   contenttype= "text/html;charset=utf-8 "   language= "java "   %>
<%@   taglib   uri= "/web-inf/struts-bean.tld "   prefix= "bean "%>
<a
        <bean:message   key= "welcome.title "/>
</a>

下面是web.xml
<?xml   version= "1.0 "   encoding= "utf-8 "?>
<web-app   version= "2.4 "
                  xmlns= "http://java.sun.com/xml/ns/j2ee "
                  xmlns:xsi= "http://www.w3.org/2001/xmlschema-instance "
                  xsi:schemalocation= "http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">

        <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 </param-value>
                </init-param>
        </servlet>
        <servlet-mapping>
                <servlet-name> action </servlet-name>
                <url-pattern> *.do </url-pattern>
        </servlet-mapping>
        <welcome-file-list>
                <welcome-file> setsolution.jsp </welcome-file>
        </welcome-file-list>
        <jsp-config>
                <taglib>
                        <taglib-uri> /web-inf/struts-bean.tld </taglib-uri>
                        <taglib-location> /web-inf/struts-bean.tld </taglib-location>
                </taglib>
                <taglib>
                        <taglib-uri> /web-inf/struts-logic.tld </taglib-uri>
                        <taglib-location> /web-inf/struts-logic.tld </taglib-location>
                </taglib>
                <taglib>
                        <taglib-uri> /web-inf/struts-html.tld </taglib-uri>
                        <taglib-location> /web-inf/struts-html.tld </taglib-location>
                </taglib>
        </jsp-config>
</web-app>

还有struts-config.xml
<?xml   version= "1.0 "   encoding= "utf-8 "?>

<!doctype   struts-config   public
    "-//apache   software   foundation//dtd   struts   configuration   1.3//en "
    "http://struts.apache.org/dtds/struts-config_1_3.dtd ">

<struts-config>
        <message-resources   parameter= "test "   />
</struts-config>

test.properties文件
welcome.tile=welcome   to   you!
放在idea的src文件里面,默认的没改动它
我只是想试试我的标签用得起不,才随便写了个   试试,但还是不行,什么原因
/web-inf/下我已经放了struts-bean.tld,struts-html.tld文件了,idea也没提示错误,只是编译时网页出现上面的错误,什么原因
发表于:2007-04-13 21:41:203楼 得分:0
你的struts配置文件有问题


快速检索

最新资讯
热门点击