在JSP中使用外部项目(Use external project in JSP)

编程入门 行业动态 更新时间:2024-10-22 05:11:47
在JSP中使用外部项目(Use external project in JSP)

我从Google Code下载了一个名为“mp4parser”的项目。

现在我想在我的JSP页面中使用它(特别是在servlet中)。 我该如何导入它?

我使用Netbeans。

在我的项目属性中,我添加了一个库(添加JAR /文件夹)。

然后,在我编写的servlet代码中

import com.googlecode.mp4parser.*;

解决了

首先,我必须编译mp4parser项目,然后手动指示JAR文件。 Netbeans无法单独找到它。

I downloaded a project from Google Code named 'mp4parser'.

Now I want to use it in my JSP page (specifically in a servlet). How do I import it?

I use Netbeans.

In my project's properties I added a Library (Add JAR/Folder).

Then, in my servlet code I wrote

import com.googlecode.mp4parser.*;

SOLVED

First I had to compile the mp4parser project, and then MANUALLY indicate the JAR file. Netbeans couldn't find it on its own.

最满意答案

您应该创建您下载的项目的jar并将其添加到类路径 ,然后您就可以使用它。

You should create jar of the project you downloaded and the add it to the class path and then you will be able to use it.

更多推荐

本文发布于:2023-04-29 09:13:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1335918.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   JSP   project   external

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!