cancel
Showing results for 
Search instead for 
Did you mean: 

missing type javax.servlet.http.HttpServletRequest

Former Member
0 Kudos

Hi

I tried to add an existing local Web Dynpro project into the NWDI. The Web Dynpro is based on WebAS 6.40 SP19 and so I added the

“JDI Build Tool 6.40”,

“SAP J2EE Engine 6.40” and

“SAP JAVA TECH SERVICES 6.40”

as the required software components for “BuildTime” in the SLD, created a track in the Landscape Configurator, made a check-in and imported these components in the Transport Studio (Scenario 2+).

But when I tried to do a rebuild of the project (after I copied the source) I got the following 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.”

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

Which SC do I have to add in the SLD as a required SC so that this Web Dynpro finds the javax.servlet.* ???

Some additional information:

My Developer Studio Version is 2.0.19

local WebAS 6.40 SP 19

Thanks

Rene

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

The required jar file is servlet.jar, this is present on your server under

\usr\sap\<ID>\<INST>\j2ee\cluster\<NODE>\bin/ext/servlet/servlet.jar

try adding this to your class path...

Do let me know in case of further queries

Former Member
0 Kudos

Hi

and thanks for your help.

I copied the servlet.jar from the folder you mentioned to the "lib"-folder of the project. After that I added this .jar-file in <i><context of the project> -> Java Build Path -> Libraries</i> to the build path.

That solved my problem.

Thanks

Rene

Former Member
0 Kudos

Hi

As I described in my last message, I thought I solved the problem but now I get an error again.

After check-in and activation the build-process was successful. In the transport studio I transported, assembled and approved the component.

But now I want to do some changes and therefore I forwarded the component to the same track and import it to the development system to be able to import the configuration again in the Developer Studio. First question: Is this the right way?

In the Developer Studio I imported the track and created a project (right-click on DC and then “Create Project …”). The servlet.jar is already in the “lib”-folder but I had to add the .jar-file manually in the properties (Java Build Path -> Libraries) of the project again. A local rebuild was successful.

I did some changes, checked in the new activity and now I want to activate, but I always get this message.

"... package javax.servlet.http does not exist

javax.servlet.http.Cookie[] theCookies;"

"...cannot access javax.servlet.http.HttpServletRequest

file javax\servlet\http\HttpServletRequest.class not found"

I also found the servlet.jar in the required component SAP-JEE (Archive servlet[sap.com]), but how can I use this one???

“Import sap.com.servlet;” is not possible.

Many thanks

Rene

Former Member
0 Kudos

Instead of adding servlet.jar to your DC, you should define the 'servlet' DC of SAP-JEE as a Used DC.

Former Member
0 Kudos

That's it.

But I didn't know so far how to do this. Meanwhile I found it out.

Thanks for your help

Answers (1)

Answers (1)

Former Member
0 Kudos

sorry for setting this topic to unanswered again.