Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

two servlet class in same context root

 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear sir

How can i add two servlet class with diffrent allias under same context root using sun microsystem application server ?

with regard
Arun kumar maalik
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Declare them both.

That's the best answer that can be given using the scant information you've provided. Want better answers? Ask better questions.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do the two servlets have the same class name and package name? They can't.

If it's just two Servlets with the same name, but different package/folder names, then you can give them two different names in the web.xml file, and have appropriate name point to the appropriate Servlet.

Sounds easy.
[ August 27, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic