<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JavaWithMarcus &#187; Java</title>
	<atom:link href="http://blog.turabdin.nl/category/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.turabdin.nl</link>
	<description>Just another Java blog</description>
	<lastBuildDate>Mon, 24 Jan 2011 14:22:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Lotus Notes: Create Excel files with POI</title>
		<link>http://blog.turabdin.nl/2011/01/lotus-notes-create-excel-files-with-poi/</link>
		<comments>http://blog.turabdin.nl/2011/01/lotus-notes-create-excel-files-with-poi/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 14:19:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Lotus Notes]]></category>

		<guid isPermaLink="false">http://blog.turabdin.nl/?p=74</guid>
		<description><![CDATA[My colleague (Martin Meijer) asked me some time ago how to easy export data to Excel without installing Excel on the server. As a Java developer I know Apache POI project. There is some great progress on that project. So I made a simple Java Agent that creates a simple Excel file and embed it as an [...]]]></description>
			<content:encoded><![CDATA[<p>My colleague (Martin Meijer) asked me some time ago how to easy export data to Excel without installing Excel on the server. As a Java developer I know Apache POI project. There is some great progress on that project.</p>
<p>So I made a simple Java Agent that creates a simple Excel file and embed it as an attachment. First of all you need to <a href="http://poi.apache.org/" target="_blank">download</a> Apache POI.</p>
<p><span id="more-74"></span></p>
<p>Create a new Java Agent. Import the poi.jar as archive. Also import the dependencies commons-logging.jar and log4j.jar</p>
<p>Edit your JavaAgent.java</p>
<p>Take a look at this code and implement your own agent (our copy it if you&#8217;re too lazy to understand).</p>
<p>Past it where the comment is (Your code goes here).</p>
<pre>// (Your code goes here)
Workbook wb = new HSSFWorkbook();
Sheet sheet = wb.createSheet("Sheet 1");
Row row = sheet.createRow(0);
row.createCell(0).setCellValue("Hello Lotus");
Document doc = agentContext.getCurrentDatabase().createDocument();

RichTextItem item = doc.createRichTextItem("item");
File tempFile = new File(doc.getNoteID());
FileOutputStream out = new FileOutputStream(tempFile);

wb.write(out);
out.close();

item.embedObject(EmbeddedObject.EMBED_ATTACHMENT, null, tempFile.getAbsolutePath(), "Excel.xls");
doc.save();

tempFile.delete();
getAgentOutput().println("Done!");</pre>
<p>Make sure that you import the classes after you pasted the code. Press Ctrl+1 on the errors.</p>
<p>If you have some questions? Place a comment or contact me at twitter <a href="http://twitter.com/JavaWithMarcus" target="_blank">@JavaWithMarcus</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.turabdin.nl/2011/01/lotus-notes-create-excel-files-with-poi/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visual Web JSF (Woodstock) IE7 HTTPS warning</title>
		<link>http://blog.turabdin.nl/2009/04/visual-web-jsf-woodstock-ie7-https-warning/</link>
		<comments>http://blog.turabdin.nl/2009/04/visual-web-jsf-woodstock-ie7-https-warning/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 19:56:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[woodstock]]></category>

		<guid isPermaLink="false">http://turabdin.4fx.biz/blog/?p=3</guid>
		<description><![CDATA[There is a bug in project woodstock when used in HTTPS with IE7 or newer. Since project woodstock has ended and all new development effort will be in ICEfaces it seems this &#8220;bug&#8221; will not be fixed. There are some solutions to change de webui-jsf.jar library to hardcode the URL, since this is not the best solution, because you [...]]]></description>
			<content:encoded><![CDATA[<p>There is a bug in <a title="Project Woodstock" href="http://woodstock.dev.java.net/" target="_blank">project woodstock</a> when used in HTTPS with IE7 or newer. Since project woodstock has ended and all new development effort will be in ICEfaces it seems this &#8220;bug&#8221; will not be fixed.</p>
<p>There are <a href="http://mentormate.com/blog/netbeans-visual-jsf-editor-tutorial-web-applications-running-https-displaying-warning-page-secure-nonsecure-items-2/" target="_blank">some</a> solutions to change de webui-jsf.jar library to hardcode the URL, since this is not the best solution, because you have to create a patch for every project (even create a patch if you move the project from test to production envoirement).</p>
<p>So i&#8217;ve looked in the code (shipped with Netbeans) and made a little fix. I determine the server URL from the HttpServletContext.</p>
<p><span id="more-51"></span></p>
<p>My fix:</p>
<p>Edited com.sun.webui.jsf.util.JavaScriptUtilities</p>
<p>The following method is little bit changed to determine the jsFile String</p>
<pre>   private static void renderJavaScriptInclude(UIComponent component,
            ResponseWriter writer, String file) throws  IOException
        if (file == null) {
            return;
        }
        String baseURL = "";
        try
        {
            HttpServletRequest req = (HttpServletRequest)FacesContext
                 .getCurrentInstance().getExternalContext().getRequest();
            StringBuffer url = req.getRequestURL();
            baseURL = url.substring(0, url.indexOf("/",10));
            // HTTPS fix over LB
            if (baseURL.indexOf(":443") &gt;0)
            {
                baseURL = baseURL.replaceFirst("http://", "<a href="https://&quot;).replaceFirst(&quot;:443">https://").replaceFirst(":443</a>", "");
            }
        }
        catch (Exception e)
        {
            baseURL = "";
        }
        String jsFile = baseURL + getTheme().getPathToJSFile(file);
</pre>
<p>You can also <a href="http://download.turabdin.nl/webui-jsf.jar">download the patched jar</a> file and put it in your netbeans directory/visualweb2/modules/ext/</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.turabdin.nl/2009/04/visual-web-jsf-woodstock-ie7-https-warning/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>ICEfaces 1.8.0 is out now</title>
		<link>http://blog.turabdin.nl/2009/04/icefaces-1-8-0-is-out-now/</link>
		<comments>http://blog.turabdin.nl/2009/04/icefaces-1-8-0-is-out-now/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 13:47:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[icefaces]]></category>
		<category><![CDATA[jsf]]></category>

		<guid isPermaLink="false">http://turabdin.4fx.biz/blog/?p=7</guid>
		<description><![CDATA[ICEfaces 1.8.0 is out. I&#8217;ve used various Beta &#38; RC releases of 1.8.0. They are getting close to get it to let it work good on NetBeans, but still sticked to Project Woodstock ( + DynamicFaces). Maybe this release will get me there to work with ICEfaces. Finally some annoying bugs are fixed now. Visual [...]]]></description>
			<content:encoded><![CDATA[<p>ICEfaces 1.8.0 is out. I&#8217;ve used various Beta &amp; RC releases of 1.8.0. They are getting close to get it to let it work good on NetBeans, but still sticked to Project Woodstock ( + DynamicFaces). Maybe this release will get me there to work with ICEfaces.</p>
<p>Finally some annoying bugs are fixed now. Visual Designer ICEfaces (Netbeans) works almost like a charm now.<br />
There are some small things missing (like effects) but these things are easlily to work around in JSP edit mode.</p>
<p><a title="Download ICEfaces 1.8.0" href="http://www.icefaces.org/JForum/posts/list/12216.page" target="_blank">Download here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.turabdin.nl/2009/04/icefaces-1-8-0-is-out-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

