aspose file tools*
The moose likes JSP and the fly likes Best Practice For Importing Static Content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Best Practice For Importing Static Content" Watch "Best Practice For Importing Static Content" New topic
Author

Best Practice For Importing Static Content

Scott Maclary
Ranch Hand

Joined: May 11, 2005
Posts: 34
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

Joined: Mar 08, 2007
Posts: 1585
Hi,

Did you try the include directive ?



Let me know what happened with you ...

Best of luck ...


Vassili ...
SCJP 5.0, SCWCD 1.4, SCJA 1.0
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

As of JSP 2.0 <c:import> is the best way to accomplish what you are after,.

A 403 error means permission was denied.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Best Practice For Importing Static Content