cancel
Showing results for 
Search instead for 
Did you mean: 

Client Browser detection in WD Java . NW7.3

Former Member
0 Kudos

Hello,

thanks in advance for reading me. My problem is that i have to get client browser info from web dynpro java in version netweaver 7.3 sps05. I tryed

http://help.sap.com/saphelp_nw73/helpdata/en/49/d33e6e677758c1e10000000a421937/frameset.htm

and

code like :

HttpServletRequest request = (HttpServletRequest) WDProtocolAdapter.getProtocolAdapter().getRequestObject().getProtocolRequest();

but in both options i added in netweaver developer studio servlet.jar from  ...\<instance>\J04\j2ee\cluster\bin\ext\servlet\lib\servlet.jar to project properties -> Java Build Path-> Libraries and when i try to build it fails given me the next error:

"[javac] ERROR: import javax.servlet.http.HttpServletRequest;

etc..."

My question is how i can retrive using a standard way the client browser info or how i can add servlet.jar to try to get browser info in that way.

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

SandipAgarwalla
Active Contributor
0 Kudos

with 7.3, local development is no longer supported...Adding JARs in build path will not help.

See my blog on how to add JARs for 7.3 development

For your case, you need to add the dc - servlet

I know this is deprecated, but I didnt find any other one for Servlet JARs

Sandip

Former Member
0 Kudos

Hello!

First, thanks for your help! Well, i was checking my available DCs to include and i only found servlet_jsp. Thanks for the reference to your blog too, but i know how to do that, but i didnt found a DC which contains servlet.jar. So its possible that i have missed a DC or that i need to ask basis team to install something?

After your confirmation that its not possible to add your own jar files, what's the correct way Now, i am wondering how to, for example, make a webdynpro that uses a smtp jar to send emails.

Thanks in advance.

SandipAgarwalla
Active Contributor
0 Kudos

its under SERVERCORE SCA..See the screenshot

Just do a search using "ser"..you should get it..If it does not show, then hit on the Refresh button..

On your other question, for javamail - there is a standard DC available "mail"..you can use that.

For other external JARs (Non-SAP), you will have to create a Library DC, add the jars, create public part and then add the dependency

Hope this helps.

Sandip

Former Member
0 Kudos

I realized that when i try to add a DC on dependencies tab i can just add DC from the portal develpment, but not from "LocalDevelopment" where i did found the SERVERCORE/servlet. How i can add DC from "LocalDevelopment" to Portal_dev ?

Thanks in advance Sandip Agarwalla!

SandipAgarwalla
Active Contributor
0 Kudos

I am assuming "Portal_Dev" is your NWDI track here..seems like the SAP delivered SCAs/DCs (ServerCORe, ENGINEAPI etc) are not referenced by the custom track. Probably you can check with your basis team to add the reference to your custom tracks.

Former Member
0 Kudos

Finally problem was solved. The problem is that i had to add SERVERCORE as a DC dependency on my SC on my nwdi track. Thanks for helping me.

Regards and thanks again.

Former Member
0 Kudos

Hi Sandeep,

We are also facing errors on the javax.* imports. You are talking about the SERVERCORE SC above which do not seem to find in our landscape. We have added the required dependencies as per the note 1457908.

Can you please suggest @ the earliest if we have missed anything?

Also I do not see LocalDevelopment. Can you please suggest how can I get that too?

Thanks

Gourav