cancel
Showing results for 
Search instead for 
Did you mean: 

HttPServletRequest and HttpServletResponse

Former Member
0 Kudos

Hi ,

I wanted to create servlet request and response by using the follwing code. it doesnt compile. Should i add servlet.jar in class path? which folder of my Web dynpro project should i put servlet .jar so that it would be available during runtime?

HttpServletRequest request =((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();

HttpServletResponse response =((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletResponse()

regards,

Sujesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sujesh,

You can add a jar file to your project in two ways :

1) copy the jar to the 'lib' or any other folder of your project. Then in build path of your project , select 'Add Jars' and add this jar.

2) In your build path, select 'Add external jars' and select the jar file from the local system. Do remember to check this file in the 'order export & import' tab.

Hope this helps,

Best Regards,

Nibu.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sujesh,

How you resolved this issue, here I am also facing the same problem it is not compiling me. I have added required servlet.jar file into java buildpath, but it still not compiling. Is there any other required for this issue.

Regards

Suresh

Former Member
0 Kudos

Hi Suresh,

Add servlet.jar in a class path and rebuild+reload the project.Try it and lemmeknow.

Regards,

Karthick