In the main method of application, there is log method, which can be used to view information in log file.
When the teacher wrote the code, he found that in the Tomact log directory can not find information, because: we use myeclipse this client software, should be shut down the server, but to the bin directory, manually open the server
That is Startup.bat. This file, and then found the information in the log directory:
Here, I entered the user name, here when the program is running a blank page, only to the log directory can be viewed information.
Code:
login.jsp
?
1 2 3 4 5 6 7 |
<body>
<form action=
"yan.jsp"
>
用户名:<input type=
"text" name=
"name"
/><br/>
<input type=
"submit" value=
"登陆"
/>
</form>
</body>
|
yan.jsp
?
1 2 3 4 5 6 |
<body> <% String str=request.getParameter( "name" ); application.log( "今天的访客是:" +str); %> |
Here, I entered the user name, here when the program is running a blank page, only to the log directory can be viewed information.