<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR>
<STYLE>@font-face {
font-family: Verdana;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
P {
FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
PRE {
FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"
}
SPAN.EmailStyle19 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle20 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle21 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
SPAN.throw {
FONT-WEIGHT: bold; COLOR: #990000
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2>Hi Jehan,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2>I played a lot with the static export these days
;-)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2>I got the same error and found the explanation and
solution!!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2>What I understood is that when doing a static export,
OpenCms has 2 behaviours (gurus, correct me if I understood
wrong):</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2>- for non-template files, it just copies the file to
filesystem</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2>- for template files, the files need to be "compiled"
against a template. And what's the easiest way to get the compiled file?... to
request it! So OpenCms just connects to itself to query the file throught HTTP,
as a web browser would do.</FONT></SPAN></DIV><SPAN class=562282508-06082008>
<DIV dir=ltr align=left><BR><FONT face=Arial color=#0000ff size=2>To achieve
this, OpenCms needs to build the request URL. This URL is based on exporturl
tag. You will see that in your case, the url is not correct because the default
value is set for Tomcat. You need to replace 127.0.0.1:8080 with your actual
server host (probably something around 127.0.0.1:9080, just check how you access
OpenCms with your browser).</FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left></SPAN><SPAN class=562282508-06082008><FONT face=Arial
color=#0000ff size=2>That brings me to a note to OpenCms developpers: why should
the servername / port be hardcoded in the file, while OpenCms could very easily
<STRONG>get its own runtime servername
programatically</STRONG>?</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=562282508-06082008><FONT face=Arial color=#0000ff
size=2>Olivier</FONT></SPAN></DIV><!-- Converted from text/rtf format -->
<P><B><SPAN lang=fr><FONT face=Verdana color=#400040 size=1>Olivier
CHIROUZE<BR></FONT></SPAN></B><SPAN lang=fr><I><FONT face=Verdana color=#000000
size=1>I&0 Infrastructure</FONT></I></SPAN> <BR><SPAN lang=fr><B><FONT
face=Verdana color=#0000ff size=1>Volvo Information Technology</FONT></B></SPAN>
</P>
<DIV> </DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Jaleel,
Jehan<BR><B>Sent:</B> 29 July 2008 16:15<BR><B>To:</B>
opencms-dev@opencms.org<BR><B>Subject:</B> [opencms-dev] Error during static
export<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Hi
all,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
When I try the opencms static export feature, I am getting the following
error…<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><SPAN class=throw><B><FONT face=Verdana color=#990000
size=1><SPAN style="FONT-SIZE: 8.5pt; FONT-FAMILY: Verdana">Exception
java.net.ConnectException: Connection refused:
connect</SPAN></FONT></B></SPAN><B><FONT face=Verdana color=#990000
size=1><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 8.5pt; COLOR: #990000; FONT-FAMILY: Verdana"><BR><SPAN
class=throw><B><FONT color=#990000>at
java.net.PlainSocketImpl.socketConnect(Native
Method)</FONT></B></SPAN><BR><SPAN class=throw><B><FONT color=#990000>at
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:389)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:250)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:237)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
java.net.Socket.connect(Socket.java:543)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
java.net.Socket.connect(Socket.java:493)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.NetworkClient.doConnect(NetworkClient.java:180)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.http.HttpClient.openServer(HttpClient.java:403)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.http.HttpClient.openServer(HttpClient.java:521)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.http.HttpClient.<init>(HttpClient.java:246)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.http.HttpClient.New(HttpClient.java:320)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.http.HttpClient.New(HttpClient.java:337)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:822)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:774)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:699)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
org.opencms.staticexport.CmsAfterPublishStaticExportHandler.exportTemplateResource(CmsAfterPublishStaticExportHandler.java:436)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
org.opencms.staticexport.CmsAfterPublishStaticExportHandler.exportTemplateResources(CmsAfterPublishStaticExportHandler.java:507)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
org.opencms.staticexport.CmsAfterPublishStaticExportHandler.doExportAfterPublish(CmsAfterPublishStaticExportHandler.java:166)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
org.opencms.staticexport.CmsStaticExportManager.exportFullStaticRender(CmsStaticExportManager.java:715)</FONT></B></SPAN><BR><SPAN
class=throw><B><FONT color=#990000>at
org.opencms.workplace.tools.database.CmsStaticExportThread.run(CmsStaticExportThread.java:84)</FONT></B></SPAN></SPAN></FONT></B><FONT
face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Does anyone what is
the cause? I did not change the opencms-importexport.xml file. It still has
all the default values….<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><staticexport
enabled="true"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<staticexporthandler>org.opencms.staticexport.CmsOnDemandStaticExportHandler</staticexporthandler><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<linksubstitutionhandler>org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler</linksubstitutionhandler>
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<exportpath>export</exportpath><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<exportworkpath>temp</exportworkpath><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<exportbackups>2</exportbackups><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<defaultpropertyvalue>false</defaultpropertyvalue><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<defaultsuffixes><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".jpg"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".gif"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".png"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".doc"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".xls"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".ppt"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".pdf"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".txt"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".css"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".zip"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<suffix key=".swf"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
</defaultsuffixes><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<rendersettings><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<userelativelinks>false</userelativelinks>
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<exporturl>http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<plainoptimization>true</plainoptimization><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<testresource
uri="/system/shared/page.dtd"/><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<resourcestorender><o:p></o:p></SPAN></FONT></P>
<DIV>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<regex>/sites/.*</regex><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<!--<regex>/system/workplace/commons/style/.*</regex><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<regex>/system/galleries/.*</regex><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
<regex>/system/modules/.*/resources/.*</regex>--><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
</resourcestorender><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
</rendersettings><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">
</staticexport><STRONG><B><FONT face=Arial><SPAN
style="FONT-FAMILY: Arial">
<o:p></o:p></SPAN></FONT></B></STRONG></SPAN></FONT></P>
<P class=MsoNormal><STRONG><B><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></B></STRONG></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">The only thing is
that I am running opencms on my local machine. I am running it on Webpshere
which is on a separate server.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><STRONG><B><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></B></STRONG></P>
<P class=MsoNormal><STRONG><B><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></B></STRONG></P>
<P class=MsoNormal><STRONG><B><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Thanks,<o:p></o:p></SPAN></FONT></B></STRONG></P>
<P class=MsoNormal><STRONG><B><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Jehan<o:p></o:p></SPAN></FONT></B></STRONG></P></DIV></DIV></BLOCKQUOTE></BODY></HTML>