Taglib을 왜 쓰냐고 물어보면
이것저것 이론적인 이야기를 해도
개발자들은 금방 공감하지 못한다.
이럴 때 이 내용이 제법 설득력이 있을 것 같다.
대략 일반적인 링크를
taglib을 쓰면 이렇게 된다.
<html:link action="/Logon">
이걸 왜 쓰냐고 물어본다면
이 것이 정답...
------------------------------------------------------------------------
The html:link tag does double duty.
First, you can refer to an action or forward stored in the struts
configuration, and the tag will insert the corresponding path when the
page is rendered.
This makes it easy to "rewire" an application without touching all the pages.
Second, the link tag will "URL encode" the hyperlink to maintain the client session.
Your application can maintain client state without requiring cookies.
Tip:
Cookies - If you turn cookies
off in your browser, and then reload your browser and this page, you
will see the links with the Java session id information attached. (If
you are using Internet Explorer and try this, be sure you reset cookies
for the appropriate security zone, and that you disallow "per-session"
cookies.)
------------------------------------------------------------------------
문자 깨지는 것을 막는 url encoding 도 해주랴
context, module 다 인식해서 path를 써줘서
web app를 portable 하게 해주랴
cookie 막은 사용자를 위해 url rewrite 까지 해주랴
taglib 안쓰면 저 짓을 개발자들이 다 해야된다.
아.. 생각만해도 ㅜㅜ |