Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlet aliases are not working

 
rohit aggarwal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i am using j2ee server.
I created a servlet and a html file.I created a war file,defined aliases,deployed properly.
when i run the application,the html form gets open but when i submit the form "no page display" error comes.
i could not find it where i am wrong.
I am also not cleared how to deploy application if there are more than two servlets.
in my application there are two servlets ,one html file and 8 javabeans.
do i have to create as many war files as servlets or one war file including all servlets and bean classes.
if i create one war file then deployment tool demands only one servlet.
if i create different war files then how i could come to know which beans and html files should i add into which war file.
please clear this confusion.
with regards,
Rohit(agg_rohit@yahoo.com)
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, you have to configure all your servlets in the same web.xml file(i.e as many as you want), but if they are in different war files youre gonna have one web.xml for each war file ex with 2 servlets:
<web-app>
<servlet>
<servlet-name>Servlet1</servlet-name>
<servlet-class>yourpackage.Servlet1</servlet-class>
</servlet>
<servlet>
<servlet-name>Servlet2</servlet-name>
<servlet-class>yourpackage.Servlet2</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>ServletMappingNameForServlet1</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Servlet2</servlet-name>
<url-pattern>ServletMappingNameForServlet2</url-pattern>
</servlet-mapping>
</web-app>
How does I turn the html off to post this correctly(I�ts taking all my tags out)
[This message has been edited by Marcos Maia (edited July 24, 2001).]
[This message has been edited by Marcos Maia (edited July 24, 2001).]
[This message has been edited by Marcos Maia (edited July 24, 2001).]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marcos, you can use [ code ] and [ /code ] tags to get UBB to ignore your HTML. (leave out the spaces in the code tags.. I had to put them in , our else they'd disappear.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic