aspose file tools*
The moose likes Servlets and the fly likes Are multiple http servlets possible ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Are multiple http servlets possible ?" Watch "Are multiple http servlets possible ?" New topic
Author

Are multiple http servlets possible ?

Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
I tried having multiple http servlets but only the first one is loaded. When i try to use the second one, http.getResponseMessage() returns "Not Found". Is it possible to have multiple http servlets ?


"Quoting yourself is stupid" - Me
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
What do you mean by 'multiple servlets' ??

A web app consists of x-amount of servlets.


JDBCSupport - An easy to use, light-weight JDBC framework -
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
First servlet:
http://localhost:8080/SomePath/Servlet1
Second servlet:
http://localhost:8080/SomePath/Servlet2

SomePath are the same. Servlet 1 works, but Servlet 2 doesn't.
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
What does your mapping in the web.xml look like ?
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115


GetChartServlet works, SetImageServlet doesn't. WebService is a WS, that also works.

Thanks,
Alex
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Are you sure the class exists ??

Did you debug and check if the doGet method gets invoked ?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

ItDoesntWorkIsUseless. A webapp can have an arbitrary number of servlets. If it's not working, we'll need more details in order to be able to help.
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
Actually the servlet is working, i had errors in my client.

Sorry, i didn't meant to waste your time
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Glad to hear you figured it out :)
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115
I wonder what you said before you edited
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
things that would be beeped out on tv :-)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I had a misspelling ;)
Alex Parvan
Ranch Hand

Joined: Dec 10, 2009
Posts: 115

should've been

Funny, such a mistake creates so much trouble. That's why i love programming.
Thanks again for your help.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Glad you figured it out :)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Are multiple http servlets possible ?
 
Similar Threads
Single mapping for multiple Servlets
Fetching one table cell click and passing it to servlet
Uploading multiple image files
"Servlet2Applet Communication"
Can we deploy multiple application on JBoss at the same time?