tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Chan" <altc...@accom.per.sg>
Subject RE: How to write a servlet that handle request for .xml documents
Date Fri, 27 Sep 2002 07:26:02 GMT
I totally understand the diff between get n post. 
The purpose of me posting is to ask about the way to implement a servlet
to handle certain file type. What I am more interested to know is how
can the servlet know what to do when a request to abc.xml is pass to it.
Not whats the different between get and post etc. Please read before
replying or don't reply if you don’t' intend to. I don't call myself an
expert, but I certainly know what I can or cannot ask here. Thanks for
your rude reply.


-----Original Message-----
From: Ralph Einfeldt [mailto:ralph.einfeldt@uptime-isc.de] 
Sent: Friday, September 27, 2002 2:55 PM
To: Tomcat Users List
Subject: AW: How to write a servlet that handle request for .xml
documents

Wether doGet() or doPost() is called depends on the kind 
of request that is sent to tomcat, not on the file type.

If tomcat receives a GET-request doGet() is called, if 
tomcat receives a POST-request doPost() is called.

If the client is a browser, all href, src attributes and
forms with method="get" are GET-requests. Only forms with
method="post" are POST-request.

Other clients can choose arbitrary methods to do requests.

This is basic knowledge before you even can start to write 
servlets and this list isn't the platform for this kind of
questions.

> -----Urspr√ľngliche Nachricht-----
> Von: Aaron Chan [mailto:altcess@accom.per.sg]
> Gesendet: Freitag, 27. September 2002 08:34
> An: 'Tomcat Users List'
> Betreff: RE: How to write a servlet that handle request for .xml
> documents
> 
> 
> Hi, thanks for ur reply. I already know how to write basic 
> servlet, just that I am not sure when the tomcat redirect 
> the request of .xml file to the servlet, which method inside 
> the servlet gets to handle it? doGet or doPost? I even tried 
> service() but can't do it. Also how can I get the requested 
> file names?

--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message