Solved

Websphere 7 changes order of servlet filter-mapping on deployment

Posted on 2010-11-18
3
3,232 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
ID: 34169401
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
ID: 34169564
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
ID: 34203691
The solution is correct.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
java.io.IOException: An established connection was aborted by the software in your host machine 1 459
grep code 4 174
Multi-threading in Tomcat 4 116
JKS to store upstart data 2 84
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…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

14 Experts available now in Live!

Get 1:1 Help Now