cancel
Showing results for 
Search instead for 
Did you mean: 

missing type javax.servlet.http.HttpServletRequest

Former Member
0 Kudos

Hi All,

I have imported a par file.its giving an error after build---

Error The project was not built since its classpath is incomplete. Cannot find the class file for javax.servlet.http.HttpServletRequest. Fix the classpath then try rebuilding this project.

Error This compilation unit indirectly references the missing type javax.servlet.http.HttpServletRequest (typically some required class file is referencing a type outside the classpath)

Please help me fix this error ....from where can i get the missing..type javax.servlet.http.HttpServletRequest

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

The javax.servlet.http.HttpServletRequest class reside in the servlet.jar. You should add this to your project's build path in NWDS. You can use the predefined variable that comprises all J2EE standard libs - i.e. access the Properties of your project from the context menu, select Java Build Path -> select the Libraries tab -> press the Add Variable button. There should appear a variable called TSSAP_JAVAX_HOME. Select it, choose Extend button -> browse to lib/servlet.jar and add this to the list of referenced libraries.

This should work.

Greetings,

Praveen Gudapati

Former Member
0 Kudos

Hi Praveen,

Thanks for the solution,Now i am facing a new problem after i build the project.It says---

Error:-This compilation unit indirectly references the missing type java.lang.Object (typically some required class file is referencing a type outside the classpath)

Can u please help??

Thanks

Shikha

0 Kudos

Hi,

It looks like you are missing the JRE libraries in you build classpath (rt.jar).

In project properties window under Libraries tab, Click Add Library button and choose JRE System Library and add it.

Regards,

Praveen Gudapati

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Everine the issue is resolved

sureshmandalapu6
Active Contributor
0 Kudos

Hi shikha singh ,

You need to have the corresponding ".Jar" file for using the "javax.servlet.http.HttpServletRequest" class

Do this.

Just right click on project to properties->java build path-> add external jars add the jar file servlet.jar

search in your NWDS installed location for Jar files.

thanks

Suresh