带有struts2的java Web应用程序:Success.But [英] A java web application with struts2:Success.But

查看:131
本文介绍了带有struts2的java Web应用程序:Success.But的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了学习struts 2的自学习。我已经使用了一个可用于互联网的代码。在我选择了作者建议的jar文件版本后,我付出了很多努力。

i have done self study on learning struts 2. i have used one code available in internet.It is working fine after i got lot of struggle on selecting only the jar files versions that suggested by the author.

我对网络编程没有任何了解。为什么不支持不同版本的jar文件。如何解决这个问题以备将来学习。

i am not having any knowledge on web programming.why different versions of the jar files are not supported.How to resolve this issue for future learning.

示例来自 http://java.dzone.com / articles / struts2-tutorial-part-27

我已经对maven做了一些研究。它会解决问题。(我想是的)

i have done some study on maven.will it resolve the issues.(i guess it is)

我在给定的教程中看到了xwork jar文件。但是在最新版本的struts 2中,这个jar文件已经改为xwork-core。

i have seen xwork jar file in the given tutorial.But in the latest versions of the struts 2 this jar file has been changed to xwork-core.

我已执行以下替换。
1)xwork-2.0.6.jar(或)xwork-core2.3.1.1.jar
2)freemarker-2.3.18
3)ognl-3.0.3.jar
4)struts2-core-2.3.18
5)commons-logging-1.1.1.jar

i have done execution with the following replacement. 1)xwork-2.0.6.jar (or) xwork-core2.3.1.1.jar 2)freemarker-2.3.18 3)ognl-3.0.3.jar 4)struts2-core-2.3.18 5)commons-logging-1.1.1.jar

我的两个案例都有错误。

i got errors with the two cases.

错误是

java.lang.NoClassDefFoundError:Lcom / opensymphony / xwork2 / util / logging / Logger ;

java.lang.NoClassDefFoundError: Lcom/opensymphony/xwork2/util/logging/Logger;

这是否有任何深度原因>

IS THERE ANY IN DEPTH REASON FOR THIS>

谢谢大家..

推荐答案

如果不升级其依赖项,则无法随机升级单个jar文件:升级所有罐子。

You cannot randomly upgrade single jar files without upgrading their dependencies: upgrade all the jars.

为了将来解决这个问题,(a)看看发行版中发布的罐子,(b)使用Maven或类似的东西并停止手工进行依赖管理 - 这不值得,这很难。

To solve this problem in the future, (a) look at the jars shipped in the distro, (b) use Maven or similar and stop doing dependency management by hand--it's not worth it, and it's difficult.

这篇关于带有struts2的java Web应用程序:Success.But的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆