----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


>
>I am trying to set up a simple content handler and have the following in
>the .htaccess file in the appropriate directory:
>
>Action MyContent /servlets/Mycontent
>AddHandler MyContent html
>
>What puzzles me is that within the servlet doGet (or doPost) the call to
>the request object getContentType method always returns NULL. Assuming
>the target of the URL exists and has the .html extension should not this
>call return a non NULL value?
>
>Any hints/ideas?

request.getContentType() returns the content-type of data that 
*accompanies* the request from the client;
eg, in the case of a POST, it is most likely application/x-www-form-urlencoded.

In your case, there is no data that accompanies the request, the request 
contains only a URI that it
is up to your handler to process and return.

- Fernando

=======================================
Fernando Salazar <[EMAIL PROTECTED]>
w -781-392-2514


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to