English 中文(简体)
页: 1
原标题:package javax.servlet.http does not exist but servlet-api.jar does

I ve got my GlassFish 3.1.2 web服务器,与Java SE 1.6为Java POJOs公司开课。 JAVA_HOME、JAVA_PATH和JRE_HOME变量的确定正确无误。 I m使用LC CentOS6.2和Im,从正线和指挥线(例如,没有像春季、Eclipse等框架或工具)从事所有支离破碎工作。

我现在要使用Java Servlet,而我正在犯以下错误:

package javax.servlet.http does not exist

我假定,由于我的环境道路是正确的,因此,在汇编过程中将可看到服务器档案。 很明显,情况就是如此。

任何人都知道如何纠正这一错误? 如果要紧靠我的班子主管,那么我想要找到珍珠档案的是什么档案? 任何人都知道,该档案是从JAVA_HOME为JDK 1.6建立的。

或者,与服务器有关的档案不是jdk 1.6的一部分,需要单独下载吗?

最新资料:

如果I类 定位于服务器-api.jar,则从我的班子迅速返回玻璃纤维安装名录(例如~/glassfish3/glassfish/modules/javax.servlet-api.jar)。 因此,如下文所述,它属于玻璃纤维安装的一部分。

最佳回答

该信标不是Java SE的一部分,而是Java EE的一部分。 它没有与科索沃独立党捆绑。 将 j鱼堆积在你的玻璃鱼体内,并将其放入你的汇编类别。

问题回答

您需要servlet-api,在您的班次中加以汇编时,该编码可能配备服务器,但可在操作时间(而不是汇编时间)查阅。

• 确保您的班次中有servlet-api.jar,因为不属于标准的Java SDK。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签