Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best Practice For Importing Static Content

 
Scott Maclary
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a large static html page that never changes and needs to be on the web server instead of the app server (where it currently resides).

The problem is the main page, header, footer, sidebar and a couple of other included pages are all dynamic JSP pages. So...how to I do include a static html page that resides on the web server from a JSP page on the app server?

I have read other posts where they suggested c:import and I tried that...but I am getting an error "java.io.IOException: Server returned HTTP response code: 403 for URL: http://urltowebserver/index.html"

Is the standard practice to use c:import? If so, what was the standard before that tag was avaialable because it hasn't been around that long...?

Thanks,
Scott
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Did you try the include directive ?



Let me know what happened with you ...

Best of luck ...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As of JSP 2.0 <c:import> is the best way to accomplish what you are after,.

A 403 error means permission was denied.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vassili Vladimir:
Did you try the include directive ?


Inlcude only works for resources within the current web application.

If so, what was the standard before that tag was avaialable


There wasn't one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic