[opencms-dev] how to expand the dymamic link when static export site

wang neil neil.wangnan at gmail.com
Thu Dec 15 04:52:27 CET 2005


hello all, i'm a newbie of the opencms. I just publish 2 jsps in the sites.
the source of the pages at the end of this mail.
i want to publish the pages as static and access it from apache but tomcat.
what  need i do ?

i paste the opencms-importexport.xml at the end and i only paste the
staticexport part.

what i want is to get six files
the index.jsp convert into index.html and the link in the index.jsp was
convert into <a href="data-xxxx.html">

and according the parameter in the index.jsp generate data.jsp result. how
to do that?

what i want result is :

**************the index.html ************
Hello world <br>
ha
<a href="data_1.html">1</a><br>
<a href="data_2.html">2</a><br>
<a href="data_3.html">3</a><br>
<a href="data_4.html">4</a><br>
<a href="data_5.html">5</a><br>
******************************************
************** data_1.html *************
1
******************************************
************** data_2.html *************
2
******************************************
************** data_3.html *************
3
******************************************
************** data_4.html *************
4
******************************************
************** data_5.html *************
5
******************************************

my jsp source code is:
************* the index.jsp *******************
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
Hello world <br>
ha
<a href="<cms:link>data.jsp?abc=1</cms:link>">1</a><br>
<a href="<cms:link>data.jsp?abc=2</cms:link>">2</a><br>
<a href="<cms:link>data.jsp?abc=3</cms:link>">3</a><br>
<a href="<cms:link>data.jsp?abc=4</cms:link>">4</a><br>
<a href="<cms:link>data.jsp?abc=5</cms:link>">5</a><br>
***************************************************

************* the data.jsp ******************
<%=request.getParameter("abc")%>
**********************************************


************* opencms-importexport.xml ************
        <staticexport enabled="true">
<!--
                <staticexporthandler>
org.opencms.staticexport.CmsOnDemandStaticExportHandler
</staticexporthandler>
-->
                <staticexporthandler>
org.opencms.staticexport.CmsOnDemandHtmlSubtreeHandler</staticexporthandler>
                <exportpath>export</exportpath>
                <defaultpropertyvalue>false</defaultpropertyvalue>
                <defaultsuffixes>
                        <suffix key=".jpg"/>
                        <suffix key=".gif"/>
                        <suffix key=".png"/>
                        <suffix key=".doc"/>
                        <suffix key=".xls"/>
                        <suffix key=".ppt"/>
                        <suffix key=".pdf"/>
                        <suffix key=".txt"/>
                        <suffix key=".css"/>
                        <suffix key=".zip"/>
                        <suffix key=".swf"/>
                        <suffix key=".jsp"/>
                        <suffix key=".html"/>
                </defaultsuffixes>
                <rendersettings>
                        <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>

<vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>
                        <userelativelinks>false</userelativelinks>
                        <exporturl>
http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl>
                        <plainoptimization>true</plainoptimization>
                        <testresource uri="/system/shared/page.dtd"/>
                        <resourcestorender>
                                <regex>/sites/Hello/.*</regex>
                                <regex>/system/galleries/.*</regex>

<regex>/system/modules/.*/resources/.*</regex>
                        </resourcestorender>
                </rendersettings>
        </staticexport>
*************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20051215/ccc86b77/attachment.html>


More information about the opencms-dev mailing list