cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Web application context parameters at runtime

former_member182374
Active Contributor
0 Kudos

Hello Experts,

I've developed a web application on my J2EE.

The web application has some 'context parameters' (see image)

According to the following link:
https://help.sap.com/saphelp_nw73ehp1/helpdata/en/49/78d2d76a5d423ae10000000a421938/content.htm?
frameset=/en/49/78d2d76a5d423ae10000000a421938/frameset.htm₪t_toc=
/en/62/d678c5330a4992bc6fe927e6137c9d/plain.htm&node_id=58&show_children=true#jump58

It's possible to edit parameters at runtime:
"There are two options for configuring Web modules locally:
At runtime, using the SAP NetWeaver Administrator"

I don't want to edit web.xml and deploy the project each time I need to change a parameter...


So how do I change the parameters at runtime? (if I open NWA it's read only)

On version 7.0X it's possible by using Visual Administrator (see image)

J2EE version is 7.31 SP7.

Regards,
Omri       


Accepted Solutions (1)

Accepted Solutions (1)

daniel_ruiz2
Active Contributor
0 Kudos

hi,

ServletContext.setAttribute method should do the trick for you..

http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/1.5/api/javax/servlet/ServletContex..., java.lang.Object)

Hope it helps,
D.

former_member182374
Active Contributor
0 Kudos

Thanks Daniel,

I'm aware of ServletContext.setAttribute but I want to set the parameters by Administration tool at runtime (like NWA).

The option was available in version 7.0X (see 'contextParameters7.jpg' in my original post).

Regards,

Omri

daniel_ruiz2
Active Contributor
0 Kudos

hi Omri,

well.. I'm not totally convinced, but once I had the same problem.. I was able to modify this easily in 7.0 but as soon we did go 7.3, NWA was no longer allowing us to modify the context parameters for a web module.

I think using the Visual Administrator (another SAP Admin tool) you can modify them and restart the context in question.. but as far I tried, I was not able to do it using NWA.

sorry about my first response, but the thread subject mentions 'runtime' - I'm not too sure about runtime being the right word to describe what you are trying to do!

D.

former_member182374
Active Contributor
0 Kudos

Hi Daniel,

I opened an OSS regarding this issue and I'll update the thread.

I don't see the point of init/context parameters if there isn't administration screen to update it.

As far as I know there is no "Visual Administrator" from version 7.1 and upwards (only NWA).

Regards,

Omri

former_member182374
Active Contributor
0 Kudos

I got an official answer from SAP:


I have checked the plug-in and it turned out that it has read-only features.
The parameters are not meant to be changed via that plug-in.

You will need to redeploy your application in order to change the
context parameters.

Omri

Answers (0)