tomcat没有编译WEB-INF/libs?

发布于 2024-09-06 14:27:54 字数 514 浏览 3 评论 0原文

[irrev] 我一直在猜测并相应地询问这里出了什么问题,所以请考虑这一点。我正在进行的项目是建立一个网络应用程序,其源代码是由一家中国公司发送给我们的,作为我们从他们那里购买的硬件的门户,因此语言和时区的障碍阻碍了有效的沟通与原始开发商。此外,我以前没有构建过网络应用程序,所以这是我在不熟悉的领域中跌跌撞撞的情况。 [/irrev]

我的根本问题似乎是 WEB-INF/lib 中的库文件未被访问。静态内容加载正常,但是 (1) 我从 web.xml 页面中找到的由 .jar 创建的验证码图像无法加载,(2) 连接到包含登录名的 SQL 数据库的类和密码信息,没有做它应该做的事情:按用户名搜索时的结果总是不会产生任何结果。

现在关于解决方案:我尝试重建这些类,但我对它的预期功能知之甚少(大概比我能看到的更多的事情取决于这些类)。我的想法是,源文件可以简单地加载到 tomcat 中并部署,但尽管如此,我还是尝试在 NetBeans 中打开它们并在那里编译它们......这也不起作用。我担心这个问题太笼统了,但我已经没有选择了。这种行为向您表明什么?我的下一步应该是什么?

[irrev]
I keep making guesses and asking accordingly as to what's wrong here, so take that under consideration. The project I'm working on is setting up a web application, the source of which was sent to us by a chinese company as a portal for the hardware we're buying from them, so a language and time-zone barrier prevents effective communication with the original developer. Furthermore, I haven't built a web application before, so this is me stumbling through unfamiliar territory.
[/irrev]

My root problem appears to be that the library files in WEB-INF/lib aren't being accessed. The static content loads alright, but (1) a captcha image, which I found from the web.xml page is created by a .jar, doesn't load, and (2) the class that connects to the SQL database which contains login and password information, doesn't do what it's supposed to: the result when searching by username always yields nothing.

Now as to the solution: I have tried to reconstruct these classes, but I know far too little about what it's expected to do (presumably the far more things than I can see depend on these classes). I got the idea that the source files could simply be loaded into tomcat and deployed, but nevertheless I have tried to open them in NetBeans and compile them there...this too didn't work. I fear this is far too general a question but I'm running out of options. What does this behavior indicate to you, and what should be my next step?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

暖风昔人 2024-09-13 14:27:54

WEB-INF/lib 中的类已编译并且可供要提供服务的 Web 应用程序使用。

除了上面评论中提到的 log4j 之外,一旦您掌握了应用程序流程,我还建议您反编译一些类以便更好地了解。使用 JADdecafe

这将使您清楚地了解哪个类调用哪个类。尽管这不会与原始源代码完全匹配。

您必须从前端的 JSP 或 servlet 一直跟踪到调用数据库的逻辑。然后您可以将这些反编译的类加载到您的 IDE 中。

哈维恩表示,这只会有助于追踪问题。如果没有原始源代码来构建和部署为 Web 应用程序,您就无法自己进行和测试任何修复 - 那么您是否打算将您的发现传达给开发人员并让他们进行修复?

The classes within WEB-INF/lib are already compiled and available to the web application to be served.

In addition to log4j mentioned in comments above, once you get a hang of the application flow, I'd also suggest you decompile some of the classes for a better look. Use JAD or decafe.

This will give you a fair view of which class calls which. Though this wont be an exact match for the orginal source code.

You'll have to track from the JSP or servlet at the front end down to the logic which calls the database. You can then load these decompiled classes into your IDE.

Havign said that, this is only going to help tracing through the problem. You cant make and test any fixes yourself without the original source to build and deploy as a web app - so are you intending to communicate your findings back to the developers and get them to fix?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文