Solved

Websphere 7 changes order of servlet filter-mapping on deployment

Posted on 2010-11-18
3
3,206 Views
Last Modified: 2013-12-10
Hello Experts,

I'm new to websphere, but not to Application Servers. I've worked with a number of light weight and full fledged web/app servers and have never seen this kind of strange behavior. It appears that when I deploy my webapp to Websphere it creates a new web.xml and changes the order of my filter-mapping. This creates some strange behavior, as my filters are in a specific order to setup a hibernate session if it has not yet been done before it authenticates the user. I've combed through the files in the Websphere folders and found that the web_merged.xml file matches this new order. This must be an autogenerated file or something. I modified this file and still end up with the same 'wrong' order when I go into the WAS Admin console and look at the module deployment descriptor.

How can I force the correct order or force WAS to use my web.xml. rather than the generated one?

Thanks in advance.
0
Comment
Question by:intlgd
  • 2
3 Comments
 

Accepted Solution

by:
intlgd earned 0 total points
Comment Utility
As it turns out I have added an id: id="my_web_app" and a meta data tag: metadata-complete="true" to get it to leave my web.xml as is. This seems to have solved my problem. Will post any additional changes I run into, should I find additional steps necessary.
0
 
LVL 41

Expert Comment

by:HonorGod
Comment Utility
I believe that is the appropriate resolution for a couple of reasons.

From my testing, it appears that the contents of the web_merged.xml file is dynamically generated using application annotations whenever the AppServer is started.

So, using this technique basically circumvents the use of the web_merged.xml file.
0
 

Author Closing Comment

by:intlgd
Comment Utility
The solution is correct.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now