[opencms-dev] static exporting JSPs

Christian Steinert christian_steinert at web.de
Wed Jan 14 23:02:46 CET 2009


>  When I do a static export of a JSP, the exported JSP shows up in my 
> file system with a “.html” extension.
This probably depents on the content type that you use. Opencms cannot use a .jsp extension because it needs to make sure that your exported page can be statically served by a web server. In order to make sure that this is the case, opencms will (I think depending on the mime type that your response uses) add the extension .html to your JSP file name.

> 
> Furthermore I have the following tag in my JSP

> 
> <cms:include file="announcements_archive.html" element="body" 
> editable="true" />
> 
> Instead of having this it actually replaces this tag with the content 
> from the announcements_archive.html file. 

This is the way it is supposed to be! Why would you use JSPs if you don't want the JSP code and taglib code to be executed by opencms?
Also, the cms:include statement could never be working outside of opencms. If you should really want to export uninterpreted JSP code from opencms, then using the CMS taglib would not make sense, because the tag lib can only work when your JSP is processed *inside* of an opencms.

> 
> Can someone please advise on how I can prevent it from having “
> html” extension and from replacing my tag.
If you want to publish uninterpreted JSP code so that it can be executed later, OUTSIDE of opencms AFTER publishing then you could try to create plain text files in opencms. Opencms will definitely not touch your tags, but I don't know whether it would rewrite the file extension to ".txt". I never tried something like that. But this is a very unusual way of doing things (or maybe I misunderstood your question.)

Generally, opencms uses JSP to generate HTML pages and those final, dynamically-assembled HTML pages will be written out by the static export mechanism. If you want your JSP code to be dynamically called on each request, then don't use static export - just write your JSP code and opencms will execute it for you with each request.

hope that helps
Christian

> 
> Thanks in advance for any help.
> 
> Jehan
> _______________________________________________ This mail is sent to 
> you from the opencms-dev mailing list To change your list options, or 
> to unsubscribe from the list, please visit http://lists.opencms.org/
> 
> mailman/listinfo/opencms-dev


____________________________________________________________________
Psssst! Schon vom neuen WEB.DE MultiMessenger gehört? 
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123




More information about the opencms-dev mailing list