首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

webwork入门有关问题

2013-09-11 
webwork入门问题求助小弟新学webwork不久,遇到困难了,希望指教。服务器用的是tomcat5.0,webwork用的是最新

webwork入门问题求助
  小弟新学webwork不久,遇到困难了,希望指教。
  服务器用的是tomcat5.0,webwork用的是最新的2.2.5,文件夹名字叫做mywebwork。
  在运行的时候,输入网址,可以访问首页,但是按按钮的时候就提示出错了。出错内容如下:
################################################################################
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
com.opensymphony.xwork.util.DomHelper$DOMBuilder.<clinit>(DomHelper.java:168)
com.opensymphony.xwork.util.DomHelper.parse(DomHelper.java:116)
com.opensymphony.xwork.config.providers.XmlConfigurationProvider.loadConfigurationFile(XmlConfigurationProvider.java:650)
com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:91)
com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:85)
com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:54)
com.opensymphony.xwork.DefaultActionProxy.<init>(DefaultActionProxy.java:60)
com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:46)
com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:216)
com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.30 logs.

###############################################################################
  目录结构如下:([]里面表示目录,不会传图片,就这样表示了,有些凌乱,请包涵^_^)
  --[mywebwork]
         --index.jsp
         --success.jsp
         --input.jsp
         --[WEB-INF]
                      --webwork.xml
                      --[lib]
                             --commons-logging.jar,ognl.jar,oscore.jar,rife-continuations.jar,xwork.jar,freemarker.jar,javamail.jar,webwork-2.2.5.jar,velocity-dep.jar
                      --[classes]
                             --webwork.properties
                             --xwork.xml
                             --[edu]
                                   --[hktz]
                                        --WebworkTry.class
                      --[src]
                              --[edu]
                                   --[hktz]
                                        --WebworkTry.java
#################################################################################
webwork.xml内容如下:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app 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"
    version="2.4">

  <display-name>Welcome to Tomcat</display-name>
  <description>
     Welcome to Tomcat
  </description>
<!-- JSPC servlet mappings start -->
<servlet>
    <servlet-name>webwork</servlet-name>
    <servlet-class>com.opensymphony.webwork.dispatcher.ServletDispatcher</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>webwork</servlet-name>
    <url-pattern>*.action</url-pattern>
</servlet-mapping>
<!-- JSPC servlet mappings end -->
<taglib>
        <taglib-uri>webwork</taglib-uri>
        <taglib-location>/WEB-INF/lib/webwork-2.2.5.jar</taglib-location>
    </taglib>
</web-app>
###########################################################################
webwork.properties内容如下:
webwork.tag.altSyntax=true
###########################################################################
xwork.xml内容如下:
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" "http://www.opensymphony.com/xwork/xwork-1.0.dtd">
<xwork>
<include file="webwork-default.xml" />
<package name="default" extends="webwork-default">
<default-interceptor-ref name="completeStack"/>
        <action name="home" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="home.action">
  <p>姓名
    <input type="text" name="name" /><br>
    年龄
    <input type="text" name="age" />
<br>
    <input name="submit" type="submit" value="提交" />

  </p>
</form>
</body>
</html>
###############################################################
结构很简单,就是提交给home.action,而home.action就直接返回SUCCESS,于是就转到success.jsp.那个网页就是改了个标题,什么都没动,就不贴内容了。
不知道哪里出了问题,望各位不吝赐教,非常感谢^_^

1 楼 jk88811 2007-05-07   把代码格式化出来, 高亮显示才能看... 2 楼 kenny3548 2007-06-01   有没有把webwork.properties放在src目录下面
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行