4

I have made a web application to be deployed in the Websphere server but i came up with a problem. I have 20 servlets that use a common parameter so i have this declared on web.xml:

<context-param>
    <param-name>filePath</param-name>
    <param-value>C:\logs.txt</param-value>
</context-param>

I want this parameter to be easily edited in the Websphere console but doesn't work. I know this works on Tomcat but is there anything equivalent on websphere?

Thanks

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • I just tested this, and it is working fine for me. `String filePath= getServletContext().getInitParameter("filePath");` – Ram Vennam Jul 09 '15 at 15:22
  • @RamVennam yes it works but what i'm trying to accomplish is to edit the param in the Websphere console. – AtuaPrimade4 Jul 09 '15 at 15:30

1 Answers1

-2

You should edit web.xml only on the server, there is know interface for it in the Console, as I remember. You can find this file here:{WAS_ROOT}/profiles/profilename/config/cells/cellname/applications/enterpriseappname/deployments/deployedname/webmodulename

Link to the documentation: http://www-01.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/tweb_jsfengine.html

IRomanov
  • 42
  • 6
  • that would be ok but the users that will work with this application will not have access to the files of WAS. – AtuaPrimade4 Jul 09 '15 at 15:55
  • I know that you can use something like this ` controlServlet com.jenkov.butterfly.ControlServlet myParam paramValue ` and be able to edit on WAS but we are talking about a huge number of servlets with one common parameter. This would´t be ideal. – AtuaPrimade4 Jul 09 '15 at 15:56