This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Jboss 5.1 migration problem

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Team,

We are migrating from IBM- WebSphere 5.1 to JBoss 5.1 server. In WebSphere sever we have not manually mapped URL pattern and servlet classes in web.xml. We have created servlet class as same name as requested URL.

In websphere without URL pattern mapping all request are working fine, but in Jboss we have to define URL pattern for all request in Web.xml file.

To configure in web.xml for all existing classes to configure in Web.xml file taking more time for us, so could you please tell me is similar approach ( like WebSphere configuration) is available in Jboss server.

Thanks & Regards,
RAM CHennai


 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

chennai Kumar wrote:
In websphere without URL pattern mapping all request are working fine, but in Jboss we have to define URL pattern for all request in Web.xml file.


Unless you are using Java EE 6 annotations on those servlets, the only way to define and map a Servlet is to use the web.xml. Of course certain app servers might have their own way of allowing such mapping like perhaps what WebSphere might be doing, but that's not a portable approach (like you are noticing now) and isn't really the recommended approach.

chennai Kumar wrote:
To configure in web.xml for all existing classes to configure in Web.xml file taking more time for us, so could you please tell me is similar approach ( like WebSphere configuration) is available in Jboss server.


You don't have to map all existing classes, just the ones which are to be exposed to the outside world as the servlets. That's the right way to do it and I would recommend to start doing it instead of trying to find workarounds, which aren't there in JBoss AS in this case.

P.S: I highly recommend that instead of using a very old, outdated, no longer in development and buggy JBoss AS 5.1, you use the latest released WildFly version (JBoss AS is renamed to WildFly) from here http://wildfly.org/downloads/
 
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say keep doing this and map them manually rather than relying on the class name. It will make it easier for other developers that don't know about Websphere's ridiculous automatic mapping to know what is going on. How you name your classes should not be dependent on what urls you expose. Also, jboss 5.1 is old and has many bugs, consider moving on to wildfly, the newer APIs will also allow you to map your servlets using annotations.
 
E Armitage
Rancher
Posts: 989
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is also relevant:http://www-01.ibm.com/support/docview.wss?uid=swg21288860
 
chennai Kumar
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks Team for all your response.

Regards,
RAM Chennai
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!