File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

shorter way to access context path using EL

 
Kantutan Tayo
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there a shorter (built-in) way to access the context path using EL
i.e. shorter version of ${pageContext.request.contextPath}?
just wondering. because i have too much on my pages. i know it can be done by assigning some constant string = request.getContextPath(), so don't suggest that idea. :\

NOTE: im looking for a built-in method.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Now you can use ${contextPath} on the rest of the page.

Otherwise, no.
[ October 07, 2005: Message edited by: Bear Bibeault ]
 
Kantutan Tayo
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah, im already doing that. so no other way, eh?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64205
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not built in. You could also set up a scoped variable in the controller. Or, since it will be invariant throughout the web app's life cycle, store it as an application-scoped variable at web app startup.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic