Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why we need ibm-web-bnd.xml and ibm-web-ext.xml?

Tags:

java

websphere

Why we need ibm-web-bnd.xml and ibm-web-ext.xml in application that we need to run in WAS server. I found few things like it contain virtual host , context root etc. But i want to know why it is required for WAS server.

like image 657
JavaLearner Avatar asked Oct 19 '25 06:10

JavaLearner


1 Answers

First of all they are not required, they can be generated during the installation for example via web admin console. However they can provide some predefined settings or change the default behavior.

The ibm-web-bnd.xml file provided binding between resource references used in web module and actual components, like datasouces, queues, etc. However since Java EE 6, you can actually use the lookup attribute from the @Resource annotation to provide them in the code. See some more info about bindings here - Application bindings

The ibm-web-ext.xml file allows you to configure some settings for web module e.g. context-root, directory browsing, etc and JSP engine parameters.

The easiest way to create them is to use WebSphere Developer Tools for Eclipse (free plugin), which have graphical/text editor for them.

like image 114
Gas Avatar answered Oct 21 '25 21:10

Gas