forked from JavaOPs/topjava
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6c995a
commit 3db22fa
Showing
4 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ log | |
*.patch | ||
|
||
|
||
/src/main/java/META-INF/MANIFEST.MF |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
package ru.javawebinar.topjava.web; | ||
|
||
import org.slf4j.Logger; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import java.io.IOException; | ||
|
||
import static org.slf4j.LoggerFactory.getLogger; | ||
|
||
public class UserServlet extends HttpServlet { | ||
private static final Logger LOG = getLogger(UserServlet.class); | ||
|
||
@Override | ||
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | ||
LOG.debug("redirect to userList"); | ||
response.sendRedirect("/users.jsp"); | ||
// request.getRequestDispatcher("/users.jsp").forward(request, response); | ||
// request.getRequestDispatcher("/users.jsp").forward(request, response); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration scan="true" scanPeriod="30 seconds"> | ||
|
||
<!-- To enable JMX Management --> | ||
<jmxConfigurator/> | ||
|
||
<appender name="file" class="ch.qos.logback.core.FileAppender"> | ||
<file>${TOPJAVA_ROOT}/log/topjava.log</file> | ||
|
||
<encoder> | ||
<charset>UTF-8</charset> | ||
<pattern>%date %-5level %logger{0} [%file:%line] %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<charset>UTF-8</charset> | ||
<pattern>%-5level %logger{0} [%file:%line] %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<logger name="ru.javawebinar.topjava" level="debug"/> | ||
|
||
<root level="info"> | ||
<appender-ref ref="file"/> | ||
<appender-ref ref="console"/> | ||
</root> | ||
</configuration> |