求指点PHP如何转成JSP
假如我有如下代码:
<?php
if( $_GET['AWS'] and $_GET['WS'] == '' )
{
echo json_encode(array('ok'));
exit();
}
if( $_GET['pstac'] == '' )
{
$SHPIC = $_GET['SHPIC'] == '' ? 'hidden.gif' : $_GET['SHPIC'];
if( !in_array($SHPIC, array("phpstat.gif","countlogo8.gif","hidden.gif")) )
{
$SHPIC = 'hidden.gif';
}
header("Content-type:image/gif");
//header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
//setcookie("test", "1234567890", time()+3600, "/", ".topstat.cn");
readfile("./icos/".$SHPIC);
@flush();
}
?>
请问如何将这些代码转成JSP的文件。