• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Standard web.xml for all the application servers/servlet engines

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not sure if this is the right forum for this question...but, here's the question. Our product comprises JSPs and Servlets. We want to build a standard web.xml file for our web application, so that the same XML document can be used across ALL the major Application Servers/Servlet Engines such as Weblogic, WebSphere, Tomcat etc for deploying our web application. My instinct tells me that if we build the XML file based on J2EE specifications for web applications, this should be possible. Am I right? Secondly, where can I find such an example XML file that adheres to the J2EE specifications? I searched in Sun's site, but couldn't get to it. Any/all the help will be greatly appreciated. Thanks.
-Asuthosh.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With regards to the web.xml, the dtd should help you ensure you are 100% compliant. http://java.sun.com/dtd/web-app_2_3.dtd

As for each of the servlet runner/ app servers that might use this, they 'normally' have a second configuration file.

For example, I can tell you about iPlanet a little bit.

In versions of iPlanet App Server (i'm thinking version 6) it requires two different files, web.xml and ias-web.xml.

So the web.xml that you already have is your first file. And if you are very lucky, the deploytool for ias will produce a valid ias-web.xml automatically for you when you try to deploy a 100% compliant WAR file, containing your web.xml file.

But sometimes things go wrong. And besides this, what about WebLogic and WebSphere?

Perhaps the best approach is to be pro-active, since you are trying to sell a product. Make a distributable that you can *guarantee* to your client will run under "XXX App Server, version y.zz" because you have already gone to all the pain and misery of ensuring your distributable has all the custom extensions and proprietary xml configuration files that XXX requires. It's lots of work (for you), but hey, much less owrk for other people (like happy customers) right?

In other words, ignore Sun's brochureware about "write once, deploy everywhere".. because the stark reality is... "write once, rewrite many times"

In all fairness, this has a lot to do with companies trying to catch up to a spec, by re-writing a previously non-compliant product (and sometimes not even a java product, like Kiva and iplanet).
 
Asuthosh Borikar
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,
thanks for the reply and the valuable guidelines. Weblogic has a similar architecture for deploying web applications (web.xml, and weblogic.xml). WebSphere is turning out to be a problem.
You are absolutely right about being pro-active and making the customers happy. That's exactly what we are trying to achieve. Thanks once again.
-Asuthosh.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!