티스토리 뷰
위에 보이는 것과 같이 URL 매핑을 하는 방법을 알아보겠습니다.
tistory에서도 이와 같은 기능을 구현하고 있습니다! (절대주소)
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
<div class="btn-learn-more"> | |
<a href="<c:url value='/campaigns/${currentList[status.index].campaignName}' />">Learn More </a> | |
</div> |
위의 코드처럼 기본 키값을 이용해 url을 불러주세요!
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
@RequestMapping(value="/{campaignName}") | |
public String CampaignsDetail(@PathVariable("campaignName") String campaignName, Model model){ | |
System.out.println(campaignName); | |
return "campaignDetail"; | |
} |
@PathVariable 을 이용해(value="/{고유값}")으로 같은 페이지, 다른 키 값으로 키 값에 따라 다른 페이지를 보여 줄 수 있습니다.
'programming > spring' 카테고리의 다른 글
JSP에서 controller의 mapping한 url삽입하기 (<c:import/>사용하기) (0) | 2017.02.07 |
---|
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 클러스터인덱스
- tcp/ip monitor
- 킬러안데르스와그의친구둘
- 알고리즘
- Spring
- servlet
- 지역중첩클래스
- smarteditor2
- 중첩클래스
- 알고리즘문제해결전략
- 낭만적연애와그후의일상
- 백준저지
- aoj
- 비식별
- boj
- 데이터베이스 문제
- Eclipse
- 연애가끝났다
- java
- 익명중첩클래스
- 인스턴스클래스
- static클래스
- 익명클래스
- 넌클러스터인덱스
- url mapping
- 백준
- 요나스요나슨
- jsp
- 알고스팟
- 시스템 카탈로그
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함