• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Server side includes in WebLogic 10 JSP

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have my IIS 6 server setup to process server side includes.
I have a simple html file that I'm trying to include in the JSP using the following include:

When I use the above line in a JSP I get an error message saying: "pleaseWait is not defined". From an HTML file on the web server it works fine.
The include works in the HTML whether I use file or virtual.

Any ideas or suggestions?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a JSP, use <c:import> or the include directive.
 
Jeff Strike
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem with the include is that it tries to resolve it at compile time and the path is relative to the JSP. The html file is all static and ideally it should be served up by IIS. In the past we've changed the extension to JSP and included the necessary files in whatever app we're working on....the problem with that is we now have 10 different versions out there and not all of them look or work the same way. This is an attempt to standardize the look and centralize the code.

I guess I should have mentioned that we're using IIS and the ISAPI filter for Weblogic.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this an HTML or a JSP? If an HTML, you need to find out why IIS is deferring to Weblogic. If it's a JSP, then IIS is a non-issue.
 
Jeff Strike
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to include an html file (located on an IIS server) in a JSP.
When I do this in the JSP:
<!-- #include file="/pleaseWait/pleaseWait.html" -->
I get a message saying: pleaseWait is not defined.

When I include the exact same line in an html file on the IIS server it works fine so I know that IIS is processing the SSI correctly.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeff Strike wrote:I'm trying to include an html file (located on an IIS server) in a JSP.


How? TellTheDetails. There are many ways to do this.

When I do this in the JSP:
<!-- #include file="/pleaseWait/pleaseWait.html" -->
I get a message saying: pleaseWait is not defined.


Of course. That's not JSP. That's like trying to compile c++ using a Java compiler.

 
Jeff Strike
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Of course. That's not JSP. That's like trying to compile c++ using a Java compiler.


The #include is an SSI directive for the web server and gets processed by the web server. (In this case IIS) The compiler looks at it as an HTML comment and properly ignores it.

It just dawned on me that the problem here is that the JSP page does return through IIS, even thought the request for the page goes through IIS. After it's compiled it's being served up by WebLogic. I saw dozens of posts saying that this is supposed to work...in reality there's no way it can work as the web server has no chance to evaluate the #include.

I think I need to find another way to do this....
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeff Strike wrote:The #include is an SSI directive for the web server and gets processed by the web server. (In this case IIS) The compiler looks at it as an HTML comment and properly ignores it.

I know what it is. My point was that in a JSP page, passed off to weblogic from IIS, it's not valid.

If you'd take some time to explain, maybe some help could be offered, but you haven't really explained what you're trying to do.
reply
    Bookmark Topic Watch Topic
  • New Topic