• Post Reply Bookmark Topic Watch Topic
  • New Topic

${pageContext. request. contextPath} or c:url JSTL tag

 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Just wondering...what is the preferred way of specifying paths to css and js files?

${pageContext. request. contextPath} or by using c:url

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would not necessarily say that there is a preferred way. I use both, but tend to favor <c:url>.

I'll also occasionally use the <base> tag to set the relative base URL once on the page.
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear.
[ December 28, 2005: Message edited by: Sonny Gill ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!