tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shinya Koizumi" <skoiz...@basicengineering.ca>
Subject Re: JSP Code to capture HTTP headers
Date Mon, 31 Jul 2006 09:29:46 GMT
use these methods

   <%= request.getParameter() %>
   <%= request.getParameterNames() %>
or  you look up javax.serlvet.HttpServletRequest

----- Original Message ----- 
From: "Kaushal Shriyan" <kaushalshriyan@gmail.com>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Monday, July 31, 2006 12:10 AM
Subject: JSP Code to capture HTTP headers


> Hi ALL
> 
> I have a sample php code,
> 
> <?php header("Content-Type: text/html"); ?>
> <h1>ENV</h1>
> <?php
> foreach ($_ENV as $key => $value) {
>       echo "Key: $key, value: $value";
>       echo "<br>";
> }
> ?>
> <h1>SERVER</h1>
> <?php
> foreach ($_SERVER as $key => $value) {
>       echo "Key: $key, value: $value";
>       echo "<br>";
> }
> ?>
> <h1>COOKIE</h1>
> <?php
> 
> foreach ($_COOKIE as $key => $value) {
>       echo "Key: $key, value: $value";
>       echo "<br>";
> }
> ?>
> <h1>GLOBALS</h1>
> <?php
> foreach ($GLOBALS as $key => $value) {
>       echo "Key: $key, value: $value";
>       echo "<br>";
> }
> ?>
> 
> I wanted this to work in JSP(Java Server Pages)
> 
> Thanks and Regards
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message