tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kaushal Shriyan" <kaushalshri...@gmail.com>
Subject JSP Code to capture HTTP headers
Date Mon, 31 Jul 2006 07:10:54 GMT
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


Mime
View raw message