I want all the infomation about request object not only headers and mayby body or contents.
the page below don't show anything. what's the problem?
Thanks in advance.
<%@ page import = "java.io.*" %>
<%@ page import = "javax.servlet.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Insert title here</title>
</head>
<body>
<%
ServletInputStream is = request.getInputStream();
StringBuffer sb = new StringBuffer();
byte[] b = new byte[1024];
for (int n; (n = is.read(b)) != -1 {
sb.append(new String(b, 0, n));
}
%>
<%=sb%>
</body>
</html>
the page below don't show anything. what's the problem?
Thanks in advance.
<%@ page import = "java.io.*" %>
<%@ page import = "javax.servlet.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>Insert title here</title>
</head>
<body>
<%
ServletInputStream is = request.getInputStream();
StringBuffer sb = new StringBuffer();
byte[] b = new byte[1024];
for (int n; (n = is.read(b)) != -1 {
sb.append(new String(b, 0, n));
}
%>
<%=sb%>
</body>
</html>