Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two forms one web.xml

 
Isaac Ferguson
Ranch Hand
Posts: 922
2
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have an index.jsp which has two buttons one sends data to one form in a servlet and the other sends data to another form in another servlet.


My doubt is how to put two Servlet in the web.xml




Any idea, please?

Regards, Isaac
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The deployment descriptor (web.xml) is not limited to a single servlet.
 
Isaac Ferguson
Ranch Hand
Posts: 922
2
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thing is that when I run the app with this web.xml


but when I comment one of them like this:


It works. Then error is like this:


It fails to deploy. I have checked the folder where the files are and all looks rigth.

Any idea, please ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No logged errors regarding parsing the web.xml prior to that?
 
Isaac Ferguson
Ranch Hand
Posts: 922
2
Java Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the server log of Tomcat I got this error:



But the key is here:



any idea, please?
 
Ron McLeod
Bartender
Pie
Posts: 963
59
Android Eclipse IDE Java Linux MySQL Database Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the servlet annotated with @WebServlet as well as being described in web.xml?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic