Wrox Home  
Search P2P Archive for: Go

  Return to Index  

apache_server thread: Posting to an HTML Page...


Message #1 by "Deepak Kumar Vasudevan" <deepak@c...> on Wed, 7 Aug 2002 09:10:12 +0530
Hi,

The default configuration of Apache (or any other HTTP Server) prohibits posting to html pages since Web Server can not (does not)
process inputs to the same. In the scenario described by you, it is possible to make Apache understand that it should process inputs
that you are submitting to a HTML page by adding a suitable

AddType 

directive. You do not need to disturb your httpd.conf for this either. Use an .htaccess file in the directory or the application's
virtual directive to control this behavior.

In the AddType directive and the associated Action you need to specify which script will process the input, like  a PHP should take
over in recieving the inputs to the html page and processing the same before rendering the webpage.

But this makes all htm pages run through a preprocessor, which might not be performance-friendly for the http server though. 

==========================================
The most successful method of programming is to begin a program as
simply as possible, test it, and then add to the program until it
performs the required job."              -- PDP8 handbook, Pg 9-64

Our contact numbers have changed!
Phone: +91(44) 819 -1334, -1336, -1337, -1338, 819 3335
Fax: +91(44) 819 2339

Deepak Kumar Vasudevan, Software Engineer
CS Software Solutions Pvt. Ltd.
425 Pantheon Road, Egmore, Chennai 600 008, INDIA
URL: www.cssolutionsinc.com 
==========================================

> Subject: Post method not allowed
> From: "Gerry Vandermaesen" <gerry.v@s...>
> Date: Tue, 6 Aug 2002 22:34:11 +0200
> X-Message-Number: 1
> 
> Hi,
>  
> Please forgive if this is a stupid question :) I am trying to post a
> html-form (using the post method) with a plain html file as the action
> (extension .htm). However I get the error message that the post method
> is not allowed for url file.htm. I know it doesn't make sense to post to
> a plain html file, but still, is there any way that Apache would just
> display the page specified in the action?
>  
> Regards,
>  
> Gerry.
>  
> 
> 
> 
> 
> ---
> 

Message #2 by "Gerry Vandermaesen" <gerry.v@s...> on Wed, 7 Aug 2002 08:45:45 +0200
Thanks for the reply. 

Would I use an AddType directive as well if in fact nothing needs to be
processed at all, so all form data can be ignored and the HTML page
specified in the action tab just needs to be displayed. I know this
might not make sense, but I start from existing HTML pages who should
just be displayed without modification and without the forms really
processing anything.

Many thanks,

Gerry.

-----Original Message-----
From: Deepak Kumar Vasudevan [mailto:deepak@c...] 
Sent: woensdag 7 augustus 2002 5:40
To: Apache Server
Cc: gerry.v@s...
Subject: [apache_server] Posting to an HTML Page...


Hi,

The default configuration of Apache (or any other HTTP Server) prohibits
posting to html pages since Web Server can not (does not) process inputs
to the same. In the scenario described by you, it is possible to make
Apache understand that it should process inputs that you are submitting
to a HTML page by adding a suitable

AddType 

directive. You do not need to disturb your httpd.conf for this either.
Use an .htaccess file in the directory or the application's virtual
directive to control this behavior.

In the AddType directive and the associated Action you need to specify
which script will process the input, like  a PHP should take over in
recieving the inputs to the html page and processing the same before
rendering the webpage.

But this makes all htm pages run through a preprocessor, which might not
be performance-friendly for the http server though. 

==========================================
The most successful method of programming is to begin a program as
simply as possible, test it, and then add to the program until it
performs the required job."              -- PDP8 handbook, Pg 9-64

Our contact numbers have changed!
Phone: +91(44) 819 -1334, -1336, -1337, -1338, 819 3335
Fax: +91(44) 819 2339

Deepak Kumar Vasudevan, Software Engineer
CS Software Solutions Pvt. Ltd.
425 Pantheon Road, Egmore, Chennai 600 008, INDIA
URL: www.cssolutionsinc.com 
==========================================

> Subject: Post method not allowed
> From: "Gerry Vandermaesen" <gerry.v@s...>
> Date: Tue, 6 Aug 2002 22:34:11 +0200
> X-Message-Number: 1
> 
> Hi,
>  
> Please forgive if this is a stupid question :) I am trying to post a 
> html-form (using the post method) with a plain html file as the action

> (extension .htm). However I get the error message that the post method

> is not allowed for url file.htm. I know it doesn't make sense to post 
> to a plain html file, but still, is there any way that Apache would 
> just display the page specified in the action?
>  
> Regards,
>  
> Gerry.
>  
> 
> 
> 
> 
> ---
> 



Message #3 by "Sascha Rehbock" <srehbock@w...> on Wed, 7 Aug 2002 08:54:34
Hi,...

try to use method="get" instead of mehtod="post" in the html form head...



> Hi,

The default configuration of Apache (or any other HTTP Server) prohibits
posting to html pages since Web Server can not (does not) process inputs to
the same. In the scenario described by you, it is possible to make Apache
understand that it should process inputs that you are submitting to a HTML
page by adding a suitable

AddType 

directive. You do not need to disturb your httpd.conf for this either. Use
an .htaccess file in the directory or the application's virtual directive
to control this behavior.

In the AddType directive and the associated Action you need to specify
which script will process the input, like  a PHP should take over in
recieving the inputs to the html page and processing the same before
rendering the webpage.

But this makes all htm pages run through a preprocessor, which might not be
performance-friendly for the http server though. 

==========================================
The most successful method of programming is to begin a program as
simply as possible, test it, and then add to the program until it
performs the required job."              -- PDP8 handbook, Pg 9-64

Our contact numbers have changed!
Phone: +91(44) 819 -1334, -1336, -1337, -1338, 819 3335
Fax: +91(44) 819 2339

Deepak Kumar Vasudevan, Software Engineer
CS Software Solutions Pvt. Ltd.
425 Pantheon Road, Egmore, Chennai 600 008, INDIA
URL: www.cssolutionsinc.com 
==========================================

> Subject: Post method not allowed
> From: "Gerry Vandermaesen" <gerry.v@s...>
> Date: Tue, 6 Aug 2002 22:34:11 +0200
> X-Message-Number: 1
> 
> Hi,
>  
> Please forgive if this is a stupid question :) I am trying to post a
> html-form (using the post method) with a plain html file as the action
> (extension .htm). However I get the error message that the post method
> is not allowed for url file.htm. I know it doesn't make sense to post to
> a plain html file, but still, is there any way that Apache would just
> display the page specified in the action?
>  
> Regards,
>  
> Gerry.
>  
> 
> 
> 
> 
> ---
> 


  Return to Index