File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

include and file path

 
John Lincoln
Ranch Hand
Posts: 192
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to do a static include in my jsp, but the file path is obtained from server side. Is this possible ?
Below is the code

I tried it did not work

Can i include can have an expression ?

Even this does not seem to work

Please help

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Static includes are evaluated at translation time, so execution-time expressions cannot be used.
 
John Lincoln
Ranch Hand
Posts: 192
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear,

Thanks for the response. But this is what i am trying to do. The path for the file is generated on the server side.


I will get this info on jsp

.
How can i use the filePath in the include directive or jsp:include. If this is not possible what can be other alternatives ?

Please Help.

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64182
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll be able to use an expression in an include action, but not a directive.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic