Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 10th, 2001, 10:59 PM
joubert joubert is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 0 joubert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi, my name is Joubert. Iīm a brazilian student. I bought the book java servlet programming and I canīt find how can I call two or more servlets simultaneously when a single form is submitted from the client to the JavaWebServer??? I can do that or itīs impossible??? And if the same two servlets reside on two diferents webServers (Two different machines)???
These answers are very important for me. Thanks for your help.
Joubert.

Reply With Quote
  #2  
Old April 19th, 2001, 08:17 PM
jasonw jasonw is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 1999
Location: Columbia, SC
Posts: 5 jasonw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Joubert,
I am confused as to why you would want to post to 2 servlets. HTML will not allow this, you can only have one value for the 'action' attribute. However, I suppose you could have a gateway servlet that could call the 2 servlets and return the results. If you could elaborate on what you are trying to accomplish, I guess we could evaluate the problem better. But other than that I would suggest the gateway servlet, but If the reside on different servers you will have to use URLConnection class to call the remote servlet.

Reply With Quote
  #3  
Old April 21st, 2001, 01:00 PM
joubert joubert is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 0 joubert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi, Now I'm trying to make an application that will listen the port 80 and buffered the Url sent by client. After that, it's just duplicate the string buffered, changes the action atribute and send to one or more machines with different web Servers and different servlets, for example.

I hope this will work!!

Thanks for your help, Joubert

Reply With Quote
  #4  
Old April 21st, 2001, 11:35 PM
egolpe egolpe is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Location: Cebu City, PH
Posts: 1 egolpe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Multiple Servlets

Joubert, using multiple servlets is not that difficult. Servlet chaining is a powerful aspect of Java, and you should be able to use the forward or include properties to pass parameters to multiple servlets, which can collaborate.

If you are doing this from an HTML form, it would be easier to package your web page under the auspices of .jsp, then utilize the <jsp:forward> and <jsp:include> tags to process the data from the form into the multiple servlets or beans you are utilizing. (The .jsp engine itself is a big servlet you can utilize to speak with another servlet.)

Hope this helps.

Reply With Quote
  #5  
Old April 23rd, 2001, 02:45 AM
kollarao kollarao is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: chennai,india
Posts: 0 kollarao User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to call servlets

hai joubert
using servlet chaing you can call one or more servlets simaltaniously.actually to call a servlet from html you should mention the servlet path at action
for examle
<form action="http://localhost:8080/sevlet/something>
when ever you submited than the header calls the sevlet which reside in your websever that in servlets directory in your webserver root.
this is normally calling an servlet
other wise you want to call a servlet from another is
using sendRedirect(" ") method in SevletResonese
okay
rao.java

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Call Servlets

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap