This code works fine:
<fo:table-cell display-align="center">
<fo:table table-layout="fixed" border="1pt solid black">
<fo:table-column/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center">
<fo:block width="255px">
<%
String marker =
"&markers="+compProp.getLatitude()+","+compProp.getLongitude()+",mid"+color+mapOrder[counter-1];
String mapURL =
googleURL+"center="+compProp.getLatitude()+","+compProp.getLongitude()+"&zoom=12&size=245x185&maptype=mobile"+marker+googleKey;
System.out.println("mapURL:::"+mapURL);
%>
<fo:external-graphic src="<%= mapURL%>"
content-width="245px"
content-height="185px" vertical-align="middle" padding-before="2px"
padding-after="2px" />
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:table-cell>
But when I try to put some condition around it - put empty block, if no
latitude and longitude then it crashes:
<fo:table-cell display-align="center">
<% if (compProp.getLatitude() != null) { %>
<fo:table table-layout="fixed" border="1pt solid black">
<fo:table-column/>
<fo:table-body>
<fo:table-row>
<fo:table-cell text-align="center">
<fo:block width="255px">
<%
String marker =
"&markers="+compProp.getLatitude()+","+compProp.getLongitude()+",mid"+color+mapOrder[counter-1];
String mapURL =
googleURL+"center="+compProp.getLatitude()+","+compProp.getLongitude()+"&zoom=12&size=245x185&maptype=mobile"+marker+googleKey;
System.out.println("mapURL:::"+mapURL);
%>
<fo:external-graphic src="<%= mapURL%>"
content-width="245px"
content-height="185px" vertical-align="middle" padding-before="2px"
padding-after="2px" />
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<% } else { %>
<fo:block></fo:block>
<% } %>
</fo:table-cell>
This is a part of error message:
21:52:07,378 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP
Generated servlet error:
The code of method _jspService(javax.servlet.http.HttpServletRequest,
javax.serv
let.http.HttpServletResponse) is exceeding the 65535 bytes limit
at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErro
rHandler.java:84)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher
.java:328)
at
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java
:397)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
Why is that?
Thank you,
-Gennady
--
View this message in context:
http://www.nabble.com/Something-weird---PDF-output-crashes-when-using-Google-map-tp20473950p20473950.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]