Created
March 28, 2015 15:20
-
-
Save seriwb/f842a527d69a950cac74 to your computer and use it in GitHub Desktop.
check the request scope on jsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@page pageEncoding="UTF-8" isELIgnored="false" %> | |
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Scopeチェックコード</title> | |
| </head> | |
| <body> | |
| <%@page import="java.util.Enumeration" %> | |
| <% | |
| StringBuilder sb = new StringBuilder(); | |
| Enumeration<String> names = request.getParameterNames(); | |
| while (names.hasMoreElements()) { | |
| String name = names.nextElement(); | |
| String vals[] = request.getParameterValues(name); | |
| if (vals != null) { | |
| for (int i=0; i < vals.length; i++) { | |
| sb.append(name).append(":").append(vals[i]).append("<br>"); | |
| } | |
| } | |
| } | |
| %> | |
| <%= sb.toString() %> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment