the first works while the second doesn't.In the second the request doesn't go to inputComment.jsp when i click on the link while in the first it goes to inputComment.jsp. var is just an attribute of c:url, so why would it make any difference ? when i view the source code from the brower, i see href=""(empty string) for the second option.
i don't know how to post this..my code is not displaying.
i have
1. <c:url value='/inputComment.jsp' />
and
2.<c:url value='/inputComment.jsp' var='inputURL' />
as value for href.
the first link works while the second doesn't.In the second the request doesn't go to inputComment.jsp when i click on the link. var is just an attribute of <c:url>, so why would it make any difference ? when i view the source code from the browser, i see href=""(empty string) for the second option.hope i am clear.
Source is: page 455 in my HFSJ(topic:<c:url> for all your hyperlink needs)
1. <c:url value='/inputComment.jsp' />
and
2.<c:url value='/inputComment.jsp' var='inputURL' />
If 'var' is used with value attribute , it assigns the 'value' to the 'var' attribute , where as when 'value' attribute is used alone, it writes to HTML . and thats why you see "" when var is used and "/inputComment.jsp'", when 'value' alone is used. HTH.