forked from projectText/Text
-
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.
Merge pull request projectText#54 from dev-aram/master
마이페이지 커밋
- Loading branch information
Showing
20 changed files
with
453 additions
and
232 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.app.controller; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import com.app.Result; | ||
|
||
public class FollowFrontContriller extends HttpServlet { | ||
@Override | ||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
String target = req.getRequestURI().replace(req.getContextPath() + "/", "").split("\\.")[0]; | ||
Result result = null; | ||
System.out.println(target); | ||
if(target.equals("followerList")) { | ||
result = new Result(); | ||
result.setPath("/mypage/following.jsp"); | ||
}else if(target.equals("followingList")) { | ||
result = new Result(); | ||
result.setPath("/mypage/following.jsp"); | ||
} | ||
else if (target.equals("follower")) { | ||
result = new FollowerListOkController().execute(req, resp); | ||
}else if(target.equals("following")) { | ||
result = new FollowingListOkController().execute(req, resp); | ||
} | ||
|
||
if (result != null) { | ||
if (result.isRedirect()) { | ||
resp.sendRedirect(result.getPath()); | ||
} else { | ||
req.getRequestDispatcher(result.getPath()).forward(req, resp); | ||
} | ||
} | ||
|
||
} | ||
@Override | ||
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | ||
super.doPost(req, resp); | ||
} | ||
|
||
} |
Oops, something went wrong.