snoop.wm
来自「java servlet编程源码」· WM 代码 · 共 45 行
WM
45 行
## snoop.wm
#set $Response.ContentType = "text/html"
<HTML><HEAD><TITLE>Let's Snoop!</TITLE></HEAD>
<BODY>
## A snoop template to get comfortable with WebMacro
<H1>Miscellaneous Info</H1>
QueryString: $Request.QueryString<BR>
RemoteUser: $Request.RemoteUser<BR>
## WebMacro does not yet recognize isXXX() properties; must use a method call
## It doesn't currently have elseif either (it's being added)
#if ($Request.isRequestedSessionIdFromCookie()) {
You're in a session thanks to cookies!
}
#else {
#if ($Request.isRequestedSessionIdFromURL()) {
You're in a session thanks to URL rewriting!
}
#else {
You're not in a session, poor guy.
}
}
<H1>Parameter Info</H1>
#foreach $paramName in $Request.ParameterNames {
$paramName: $Request.getParameter($paramName) <BR>
}
<H1>Header Info</H1>
#foreach $headerName in $Request.HeaderNames {
$headerName: $Request.getHeader($headerName) <BR>
}
<H1>Cookie Info</H1>
#foreach $cookie in $Request.Cookies {
$cookie.Name: $cookie.Value <BR>
}
</BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?