<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-24578</id>
	<title>Nabble - Visual Web</title>
	<updated>2008-07-24T03:16:12Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Visual-Web-f24578.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Visual-Web-f24578.html" />
	<subtitle type="html">The NetBeans &lt;a href=&quot;http://visualweb.netbeans.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Visual Web&lt;/a&gt;&amp;nbsp;project enables Java developers to rapidly build standards-based web applications in NetBeans by dragging and dropping components and data sources on the WYSIWYG Visual Editor. It provides a comprehensive library of JavaServer Faces components and deploys your projects as a Web Archive (WAR) to Java Enterprise Edition containers like Java System Application Server, JBoss, BEA WebLogic, IBM WebSphere, Tomcat, and others.
&lt;br&gt;&lt;br&gt;If you are a Java developer and want to learn more about using the Visual Web Pack and download full releases, please visit the &lt;a href=&quot;http://www.netbeans.org/products/visualweb/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Visual Web Pack product page&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-18628948</id>
	<title>Re: change table row color issue</title>
	<published>2008-07-24T03:16:12Z</published>
	<updated>2008-07-24T03:16:12Z</updated>
	<author>
		<name>IOLAUS</name>
	</author>
	<content type="html">I dont have change the row group color of the table. I have changed the column color of the actual row. 
&lt;br&gt;&lt;br&gt;The method have to bind with the column style!
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;IOLAUS wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello,
&lt;br&gt;&lt;br&gt;( sry for my poor english )
&lt;br&gt;&lt;br&gt;I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.
&lt;br&gt;&lt;br&gt;My solution is creating styleSheet's for each colors, but i have more than 200 colors...
&lt;br&gt;&lt;br&gt;If you have an idea, please let me know. Thank you.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;IOLAUS
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/change-table-row-color-issue-tp18595687p18628948.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18628859</id>
	<title>Re: change table row color issue</title>
	<published>2008-07-24T03:09:58Z</published>
	<updated>2008-07-24T03:09:58Z</updated>
	<author>
		<name>IOLAUS</name>
	</author>
	<content type="html">Hi Rick,
&lt;br&gt;&lt;br&gt;&lt;br&gt;public String getColumnStyle() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableRowDataProvider trdp = (TableRowDataProvider) getBean(&amp;quot;currentRow&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RowKey rk = trdp.getTableRow();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // get actual row count
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SoilLayer layer = getSessionBean1().getLayers()[Integer.parseInt( 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rk.getRowId())];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &amp;quot;background-color: &amp;quot;+layer.getColorRGB(); // return Color in HEX
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;I hope it helps.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;IO.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Rick Fincher wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi IO,
&lt;br&gt;&lt;br&gt;Can you post the method for others who may have a need for this?
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Rick
&lt;br&gt;&lt;br&gt;IOLAUS wrote:
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i have fixed this Problem with a Method that give me the actual row count
&lt;br&gt;&amp;gt; back and return the color. Second i have Bind the Object on a Style and it
&lt;br&gt;&amp;gt; works.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Kind Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; IO.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; IOLAUS wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I need this function: tableColumn01.setStyle(&amp;quot;background-color: rgb(0,
&lt;br&gt;&amp;gt;&amp;gt; 255, 0);&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; IOLAUS wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ( sry for my poor english )
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have a table and want to change the row color with a colorPicker. The
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; result of the colorPicker is a Hex code like #ff0000 and it works, but i
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cant change the color of the row regard of the result of the colorPicker.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; My solution is creating styleSheet's for each colors, but i have more
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; than 200 colors...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If you have an idea, please let me know. Thank you.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; IOLAUS
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: users-unsubscribe@visualweb.netbeans.org
&lt;br&gt;For additional commands, e-mail: users-help@visualweb.netbeans.org
&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/change-table-row-color-issue-tp18595687p18628859.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18618001</id>
	<title>Re: change table row color issue</title>
	<published>2008-07-23T11:02:25Z</published>
	<updated>2008-07-23T11:02:25Z</updated>
	<author>
		<name>Rick Fincher</name>
	</author>
	<content type="html">Hi IO,
&lt;br&gt;&lt;br&gt;Can you post the method for others who may have a need for this?
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Rick
&lt;br&gt;&lt;br&gt;IOLAUS wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; i have fixed this Problem with a Method that give me the actual row count
&lt;br&gt;&amp;gt; back and return the color. Second i have Bind the Object on a Style and it
&lt;br&gt;&amp;gt; works.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Kind Regards,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; IO.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; IOLAUS wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I need this function: tableColumn01.setStyle(&amp;quot;background-color: rgb(0,
&lt;br&gt;&amp;gt;&amp;gt; 255, 0);&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; IOLAUS wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ( sry for my poor english )
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I have a table and want to change the row color with a colorPicker. The
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; result of the colorPicker is a Hex code like #ff0000 and it works, but i
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cant change the color of the row regard of the result of the colorPicker.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; My solution is creating styleSheet's for each colors, but i have more
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; than 200 colors...
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If you have an idea, please let me know. Thank you.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; IOLAUS
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18618001&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18618001&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/change-table-row-color-issue-tp18595687p18618001.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18607023</id>
	<title>Re: change table row color issue</title>
	<published>2008-07-23T02:29:44Z</published>
	<updated>2008-07-23T02:29:44Z</updated>
	<author>
		<name>IOLAUS</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;i have fixed this Problem with a Method that give me the actual row count back and return the color. Second i have Bind the Object on a Style and it works.
&lt;br&gt;&lt;br&gt;Kind Regards,
&lt;br&gt;&lt;br&gt;IO.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;IOLAUS&quot;&gt;&lt;br&gt;I need this function: tableColumn01.setStyle(&amp;quot;background-color: rgb(0, 255, 0);&amp;quot;);
&lt;br&gt;&lt;br&gt;but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;IOLAUS wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello,
&lt;br&gt;&lt;br&gt;( sry for my poor english )
&lt;br&gt;&lt;br&gt;I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.
&lt;br&gt;&lt;br&gt;My solution is creating styleSheet's for each colors, but i have more than 200 colors...
&lt;br&gt;&lt;br&gt;If you have an idea, please let me know. Thank you.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;IOLAUS
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/change-table-row-color-issue-tp18595687p18607023.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18604857</id>
	<title>Re: change table row color issue</title>
	<published>2008-07-22T23:51:52Z</published>
	<updated>2008-07-22T23:51:52Z</updated>
	<author>
		<name>IOLAUS</name>
	</author>
	<content type="html">I need this function: tableColumn01.setStyle(&amp;quot;background-color: rgb(0, 255, 0);&amp;quot;);
&lt;br&gt;&lt;br&gt;but for the TableRow like tableRowGroupName.setStyleClasses(styleClasses);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;IOLAUS wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello,
&lt;br&gt;&lt;br&gt;( sry for my poor english )
&lt;br&gt;&lt;br&gt;I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.
&lt;br&gt;&lt;br&gt;My solution is creating styleSheet's for each colors, but i have more than 200 colors...
&lt;br&gt;&lt;br&gt;If you have an idea, please let me know. Thank you.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;IOLAUS
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/change-table-row-color-issue-tp18595687p18604857.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18595687</id>
	<title>change table row color issue</title>
	<published>2008-07-22T11:47:59Z</published>
	<updated>2008-07-22T11:47:59Z</updated>
	<author>
		<name>IOLAUS</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;( sry for my poor english )
&lt;br&gt;&lt;br&gt;I have a table and want to change the row color with a colorPicker. The result of the colorPicker is a Hex code like #ff0000 and it works, but i cant change the color of the row regard of the result of the colorPicker.
&lt;br&gt;&lt;br&gt;My solution is creating styleSheet's for each colors, but i have more than 200 colors...
&lt;br&gt;&lt;br&gt;If you have an idea, please let me know. Thank you.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;IOLAUS&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/change-table-row-color-issue-tp18595687p18595687.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18523516</id>
	<title>Web Design</title>
	<published>2008-07-17T23:44:48Z</published>
	<updated>2008-07-17T23:44:48Z</updated>
	<author>
		<name>Ignacio36</name>
	</author>
	<content type="html">It is good that everyone should have a personal project, like building a tree house, playing sports, or even cleaning the house. What's better for everyone is that they make money off their personal hobbies. &lt;b&gt;&lt;a href=&quot;http://www.wspgweb.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Professional website design&lt;/a&gt;&lt;/b&gt;&amp;nbsp;is one of the best opportunities to make money and have fun while you're at it. After working for nine years, I decided to take on something on the side. I started web design after a friend who works exclusively in computers recommended it. After learning HTML from www.htmlschool.org, I started to create my own website. I also started making money off the site, so I decided to keep with my new project.
&lt;br&gt;&lt;br&gt;Web design is one of the easiest skills to learn. Once you are able to code HTML, using other websites as guides, you should be able to create your own website. And if you decide to put advertising in your websites, you may even make a little money on the side. Of course, it can never substitute a real income, but as you learn more complex forms of web design, you can build on your earnings with more professional style websites. Besides, web design promotes the user's creativity, intelligence, and determination. These qualities are paramount in establishing a useful hobby.
&lt;br&gt;&lt;br&gt;The fact that the internet is one of the most rapidly growing attractions in society is reason enough to begin web design. As more information is added onto the internet, the number of websites increases. It is also likely that one's website will be popular if it holds just the right information that people demand, so it may prove to be profitable for the designer. It's like owning a small business in some aspects, as you are your own boss, you earn money, and you supply a product for the people. Web design is suitable for all ages. A great first step for children to take in starting a job is to begin on the internet, a field that they are both familiar to and talented in. Others may find it as a healthy alternative to a restricted lifestyle, or some may even consider it to be a little financial helper. In any perspective, however, web design is one of the most interesting and popular types of work in the world of today and tomorrow
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Development-f24581.html&quot; embed=&quot;fixTarget[24581]&quot; target=&quot;_top&quot; &gt;Visual Web - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Web-Design-tp18523516p18523516.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18455539</id>
	<title>Re: Is relative addressing possible with a hyperlink component?</title>
	<published>2008-07-14T16:47:54Z</published>
	<updated>2008-07-14T16:47:54Z</updated>
	<author>
		<name>fieyr2002</name>
	</author>
	<content type="html">Just figured it out! Apparently you have to say /faces/upload/images/picture.gif. Nevermind :P
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;fieyr2002 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;I've been trying to figure it out with /../../ bla bla but not having much luck.
&lt;br&gt;&lt;br&gt;I'm trying to link a hyperlink component to a picture stored in my project files by setting the url property. Currently it's set to &lt;a href=&quot;http://localhost:8080/Uploading4/faces/upload/images/500k.gif&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8080/Uploading4/faces/upload/images/500k.gif&lt;/a&gt;&amp;nbsp;but I'd like to say something along the lines of /upload/images/500k.gif but I can't get it to work.
&lt;br&gt;&lt;br&gt;Any ideas?
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Development-f24581.html&quot; embed=&quot;fixTarget[24581]&quot; target=&quot;_top&quot; &gt;Visual Web - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Is-relative-addressing-possible-with-a-hyperlink-component--tp18454714p18455539.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18454714</id>
	<title>Is relative addressing possible with a hyperlink component?</title>
	<published>2008-07-14T15:36:33Z</published>
	<updated>2008-07-14T15:36:33Z</updated>
	<author>
		<name>fieyr2002</name>
	</author>
	<content type="html">I've been trying to figure it out with /../../ bla bla but not having much luck.
&lt;br&gt;&lt;br&gt;I'm trying to link a hyperlink component to a picture stored in my project files by setting the url property. Currently it's set to &lt;a href=&quot;http://localhost:8080/Uploading4/faces/upload/images/500k.gif&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://localhost:8080/Uploading4/faces/upload/images/500k.gif&lt;/a&gt;&amp;nbsp;but I'd like to say something along the lines of /upload/images/500k.gif but I can't get it to work.
&lt;br&gt;&lt;br&gt;Any ideas?&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Development-f24581.html&quot; embed=&quot;fixTarget[24581]&quot; target=&quot;_top&quot; &gt;Visual Web - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Is-relative-addressing-possible-with-a-hyperlink-component--tp18454714p18454714.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18450359</id>
	<title>Looking for help to set the keyword for website!!</title>
	<published>2008-07-14T11:43:06Z</published>
	<updated>2008-07-14T11:43:06Z</updated>
	<author>
		<name>brook.brian55</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;I’m new in online business and looking for a help to give good keyword to my website so that I can get good traffic. I know the correct keyword helps in increasing the online business. If you people have any idea in this or you may have any experience that can help me in selecting the correct key word then please suggest me. Any help will be highly appreciated. &amp;nbsp;
&lt;br&gt;&lt;br&gt;Thanks in advance!!!!
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Development-f24581.html&quot; embed=&quot;fixTarget[24581]&quot; target=&quot;_top&quot; &gt;Visual Web - Development&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Looking-for-help-to-set-the-keyword-for-website%21%21-tp18450359p18450359.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18449411</id>
	<title>Problem with table component NB 6.1</title>
	<published>2008-07-14T10:57:38Z</published>
	<updated>2008-07-14T10:57:38Z</updated>
	<author>
		<name>w.delacruz</name>
	</author>
	<content type="html">Hi, I got a problem when running an visual web application in Netbeans 6.1. In the JSP page I dragged &amp;nbsp;a table component binding the data from a MySQL database. Everything works good but when I check my application in a browser (firefox 3), the table doesn't appear.
&lt;br&gt;&lt;br&gt;When I look the html source code this is what i got..
&lt;br&gt;&lt;br&gt;....
&lt;br&gt;&amp;lt;head&amp;gt;
&lt;br&gt;&amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;var webui_suntheme4_2={&amp;quot;webuiJsfx&amp;quot;:false,&amp;quot;webuiAll&amp;quot;:false,&amp;quot;theme&amp;quot;:{&amp;quot;locale&amp;quot;:&amp;quot;en-us&amp;quot;},&amp;quot;ajax&amp;quot;:{&amp;quot;isJsfx&amp;quot;:true},&amp;quot;isDebug&amp;quot;:false,&amp;quot;isStyleSheet&amp;quot;:true,&amp;quot;parseOnLoad&amp;quot;:true};&amp;lt;/script&amp;gt;&amp;lt;script 
&lt;br&gt;...
&lt;br&gt;&amp;lt;div id=&amp;quot;form1:table1&amp;quot; style=&amp;quot;position: absolute; left: 168px; top: 120px&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;div style=&amp;quot;width:0px&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;table id=&amp;quot;form1:table1:_table&amp;quot; class=&amp;quot;Tbl_sun4&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;
&lt;br&gt;&lt;br&gt;As you can see the HTML code is cut in the table component, but when I drag just a table component without any binding ,from a database for example, the browser show me the table with the default values.
&lt;br&gt;Do I have to set anything else in NetBeans or it's just a matter of the browser??
&lt;br&gt;&lt;br&gt;P.D. I'm using Ubuntu &lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Problem-with-table-component-NB-6.1-tp18449411p18449411.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18436111</id>
	<title>Re: Help with uploading file tutorial</title>
	<published>2008-07-13T18:32:17Z</published>
	<updated>2008-07-13T18:32:17Z</updated>
	<author>
		<name>fieyr2002</name>
	</author>
	<content type="html">Woops, forgot the link to the tutorial.. 
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.netbeans.org/kb/60/web/fileupload.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.netbeans.org/kb/60/web/fileupload.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;fieyr2002 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Alright, so I've worked through this tutorial here to help me figure out file uploading. My problem is, it is currently uploading the file to build/web/resources... I'd prefer it to go to web/resources.
&lt;br&gt;&lt;br&gt;The tutorial does tell you how to upload to a different folder within the web application in its &amp;quot;doing more&amp;quot; section. Only problem is, it doesn't tell you specifically what to do with the code it provides. In other words...how to alter the coding you did in the tutorial that makes the picture save to build/web/resources. On a side note, I'd also like it to keep the original file name as well as the extention. The tutorial only takes like 5 minutes to work though. If anyone can help me, I'd really appreciate it.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-with-uploading-file-tutorial-tp18436098p18436111.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18436098</id>
	<title>Help with uploading file tutorial</title>
	<published>2008-07-13T18:31:01Z</published>
	<updated>2008-07-13T18:31:01Z</updated>
	<author>
		<name>fieyr2002</name>
	</author>
	<content type="html">Alright, so I've worked through this tutorial here to help me figure out file uploading. My problem is, it is currently uploading the file to build/web/resources... I'd prefer it to go to web/resources.
&lt;br&gt;&lt;br&gt;The tutorial does tell you how to upload to a different folder within the web application in its &amp;quot;doing more&amp;quot; section. Only problem is, it doesn't tell you specifically what to do with the code it provides. In other words...how to alter the coding you did in the tutorial that makes the picture save to build/web/resources. On a side note, I'd also like it to keep the original file name as well as the extention. The tutorial only takes like 5 minutes to work though. If anyone can help me, I'd really appreciate it.&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Help-with-uploading-file-tutorial-tp18436098p18436098.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18414510</id>
	<title>Re: MY NETBEANS NOT ABLE TO DOWNLOAD VISUAL JSF</title>
	<published>2008-07-11T17:05:52Z</published>
	<updated>2008-07-11T17:05:52Z</updated>
	<author>
		<name>artibee</name>
	</author>
	<content type="html">WHALEWEB wrote:
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm using netbeans6.0, On updation it is unable to download the patches for
&lt;br&gt;&amp;gt; visual jsf and its asking for password,username. If any body knows that
&lt;br&gt;&amp;gt; please help
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Whale Web.
&lt;br&gt;&lt;br&gt;Hi Whale Web,
&lt;br&gt;&lt;br&gt;One thought is that this prompt may be due to a proxy server,
&lt;br&gt;ie, the system is asking for the proxy user and password.
&lt;br&gt;&lt;br&gt;The IDE's 'Tools | Options | General' panel provides options for 
&lt;br&gt;configuring the Proxy Settings (see options.png below).
&lt;br&gt;&lt;br&gt;When using manual settings, clicking on the 'More' button leads to the
&lt;br&gt;Advanced Proxy Options dialog (see proxy.png below) where more options
&lt;br&gt;such as the Username and Password for Proxy Authentication can be set.
&lt;br&gt;&lt;br&gt;Does this help?
&lt;br&gt;&lt;br&gt;cheers/Mary
&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://www.nabble.com/file/p18414510/options.png&quot; border=&quot;0&quot; /&gt;&lt;br&gt;&lt;br&gt;&lt;img src=&quot;http://www.nabble.com/file/p18414510/proxy.png&quot; border=&quot;0&quot; /&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/MY-NETBEANS-NOT-ABLE-TO-DOWNLOAD-VISUAL-JSF-tp18396600p18414510.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18396600</id>
	<title>MY NETBEANS NOT ABLE TO DOWNLOAD VISUAL JSF</title>
	<published>2008-07-10T21:30:33Z</published>
	<updated>2008-07-10T21:30:33Z</updated>
	<author>
		<name>WHALEWEB</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I'm using netbeans6.0, On updation it is unable to download the patches for visual jsf and its asking for password,username. If any body knows that please help
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;Whale Web.&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/MY-NETBEANS-NOT-ABLE-TO-DOWNLOAD-VISUAL-JSF-tp18396600p18396600.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18391497</id>
	<title>Using Skype4Java API: How?</title>
	<published>2008-07-10T13:44:46Z</published>
	<updated>2008-07-10T13:44:46Z</updated>
	<author>
		<name>rrugemalira</name>
	</author>
	<content type="html">Using Skype4Java API: How?
&lt;br&gt;Objective: I'd like to send SMS Text message from JSF page to skype registered phone numbers simultaneously.
&lt;br&gt;I want to use Skype and Skype4Java API to achieve the objective.
&lt;br&gt;Could not find any documentation on Skype4Java API.
&lt;br&gt;Any ideas on how to start this exercise? I'd appreciate your kind direction.&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Using-Skype4Java-API%3A-How--tp18391497p18391497.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18323074</id>
	<title>Integrating Java Web start inside a JSF web application</title>
	<published>2008-07-07T11:13:17Z</published>
	<updated>2008-07-07T11:13:17Z</updated>
	<author>
		<name>dbsarvesh</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&amp;nbsp; &amp;nbsp; I would like to integrate a jar file which will be deployed using java web start into the JSF project. I have a JFrame class and it is used for 3D display of a object file and I can do it only using java web start. &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; Now in my application when the user clicks on a button I would like to show the 3D display of the selected item using java web start. I am using a dynamic JNLP for calling the jar file with the selected item as argument. And that items 3D display should be displayed.
&lt;br&gt;&amp;nbsp; &amp;nbsp; Please suggest me the way, if available, for integrating the jar of java web start in JSF application.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Subhash&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Integrating-Java-Web-start-inside-a-JSF-web-application-tp18323074p18323074.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18273946</id>
	<title>Re: Read &quot;Display&quot; column from a DropDown List</title>
	<published>2008-07-03T23:55:39Z</published>
	<updated>2008-07-03T23:55:39Z</updated>
	<author>
		<name>ammaia</name>
	</author>
	<content type="html">Hi HandyGeek.
&lt;br&gt;With your code the question is resolved!!! &amp;nbsp;&lt;img class='smiley' src='http://www.nabble.com/images/smiley/smiley_good.gif' /&gt;&lt;br&gt;&lt;br&gt;Thanks for your help.
&lt;br&gt;Jose
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Read-%22Display%22-column-from-a-DropDown-List-tp18243353p18273946.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18270587</id>
	<title>Re: Read &quot;Display&quot; column from a DropDown List</title>
	<published>2008-07-03T17:27:24Z</published>
	<updated>2008-07-03T17:27:24Z</updated>
	<author>
		<name>HandyGeek</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
&lt;span&gt;Try this:
&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Iterator iter = (Iterator) this.&lt;b class=&quot;highlight&quot;&gt;dropDown1&lt;/b&gt;.getListItems();
&lt;/span&gt;&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; while(iter.hasNext()) &lt;/span&gt;&lt;span&gt;{
&lt;/span&gt;&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ListItem opt = (ListItem) iter.next();
&lt;/span&gt;&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(opt.getValue().equals(this.&lt;b class=&quot;highlight&quot;&gt;dropDown1&lt;/b&gt;.getValue().toString()))
&lt;/span&gt;&lt;span&gt;{
&lt;/span&gt;&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String label = opt.getLabel();
&lt;/span&gt;&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;
&lt;/span&gt;&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;/span&gt;&lt;br&gt;
&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
ammaia wrote:
&lt;blockquote cite=&quot;mid:18243353.post@talk.nabble.com&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;Hi, 
I have webPage with a dropDownList (drpDown1) with the items about countries
and phone numbers. Something like: 
Albania    +355 
Angola     +244 
Argentina  +54 
Australia   +61 
   (...)     (...)

At the left side is the Display text in the combobox. At the right side is
the Value associated.
When, for example, the first is selected, doing drpDown1.getValue()) the
result is &quot;+355&quot;

How to get the Display name (Albania) ?

I've tried getItem(), getSelected(),getLocalValue() but no one works...

Regards
Jose


  &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Read-%22Display%22-column-from-a-DropDown-List-tp18243353p18270587.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18243353</id>
	<title>Read &quot;Display&quot; column from a DropDown List</title>
	<published>2008-07-02T10:59:51Z</published>
	<updated>2008-07-02T10:59:51Z</updated>
	<author>
		<name>ammaia</name>
	</author>
	<content type="html">Hi, 
&lt;br&gt;I have webPage with a dropDownList (drpDown1) with the items about countries and phone numbers. Something like: 
&lt;br&gt;Albania &amp;nbsp; &amp;nbsp;+355 
&lt;br&gt;Angola &amp;nbsp; &amp;nbsp; +244 
&lt;br&gt;Argentina &amp;nbsp;+54 
&lt;br&gt;Australia &amp;nbsp; +61 
&lt;br&gt;&amp;nbsp; &amp;nbsp;(...) &amp;nbsp; &amp;nbsp; (...)
&lt;br&gt;&lt;br&gt;At the left side is the &lt;b&gt;Display&lt;/b&gt;&amp;nbsp;text in the combobox. At the right side is the Value associated.
&lt;br&gt;When, for example, the first is selected, doing drpDown1.getValue()) the result is &amp;quot;+355&amp;quot;
&lt;br&gt;&lt;br&gt;How to get the &lt;b&gt;Display&lt;/b&gt;&amp;nbsp;name (Albania) ?
&lt;br&gt;&lt;br&gt;I've tried getItem(), getSelected(),getLocalValue() but no one works...
&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Jose
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Read-%22Display%22-column-from-a-DropDown-List-tp18243353p18243353.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18220664</id>
	<title>Table Format</title>
	<published>2008-07-01T09:57:24Z</published>
	<updated>2008-07-01T09:57:24Z</updated>
	<author>
		<name>puntapari</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;Which is the way to change the format of a table. Concretly, puttin the values instead of vertically, in horizontal format.
&lt;br&gt;&lt;br&gt;From this way:
&lt;br&gt;&lt;br&gt;_NAME_ &amp;nbsp; _SURNAME_
&lt;br&gt;&amp;nbsp;Mike &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Johnson
&lt;br&gt;&amp;nbsp;David &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Stoner
&lt;br&gt;&lt;br&gt;&lt;br&gt;To this one:
&lt;br&gt;&lt;br&gt;_NAME_ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Mike &amp;nbsp; &amp;nbsp; &amp;nbsp; David
&lt;br&gt;_SURNAME_ &amp;nbsp; &amp;nbsp;Johnson &amp;nbsp; &amp;nbsp;Stoner
&lt;br&gt;&lt;br&gt;Many thanks!!!&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Table-Format-tp18220664p18220664.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18214042</id>
	<title>Re: Drop down list values from both Database and custom</title>
	<published>2008-07-01T04:15:42Z</published>
	<updated>2008-07-01T04:15:42Z</updated>
	<author>
		<name>Futaleufu_John</name>
	</author>
	<content type="html">First, I wouldn't use the default options list. It's really just a placeholder for the options you want.
&lt;br&gt;&lt;br&gt;In your case, I suggest using an object list data provider and binding your dropdown list to that.
&lt;br&gt;&lt;br&gt;The following link shows you how to create the data provider: &lt;a href=&quot;http://blogs.sun.com/winston/entry/objectlistdataprovider_workaround&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blogs.sun.com/winston/entry/objectlistdataprovider_workaround&lt;/a&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;dbsarvesh wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message&quot;&gt;Hi,
&lt;br&gt;&amp;nbsp; &amp;nbsp;I have a drop down and am populating it from one of the table from the DB. My requirement is to add one more general custom option to that drop down. Please suggest me how can I do that?
&lt;br&gt;&lt;br&gt;But when I am assigning this dropDown2DefaultOptions from the design to the drop Down, I am getting 500 error. Please let me know how to proceed.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Drop-down-list-values-from-both-Database-and-custom-tp18207843p18214042.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18213979</id>
	<title>Re: Problem in DropDownList AutoSubmit onChange</title>
	<published>2008-07-01T04:10:18Z</published>
	<updated>2008-07-01T04:10:18Z</updated>
	<author>
		<name>ammaia</name>
	</author>
	<content type="html">The solution is at &lt;a href=&quot;http://www.netbeans.org/kb/60/web/clientsiderendering.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.netbeans.org/kb/60/web/clientsiderendering.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Thanks for all help.
&lt;br&gt;Regards
&lt;br&gt;Jose
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Problem-in-DropDownList-AutoSubmit-onChange-tp18198002p18213979.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18207898</id>
	<title>Re: Problem in DropDownList AutoSubmit onChange</title>
	<published>2008-06-30T19:04:28Z</published>
	<updated>2008-06-30T19:04:28Z</updated>
	<author>
		<name>dbsarvesh</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&amp;nbsp; I hope you are writing your logic of assigning the value to the text field in dropdown_processValueChange((ValueChangeEvent vce) method, which will get called after the auto submit. you can get to that method by double clicking on the drop down.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Subhash
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;ammaia wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi,
&lt;br&gt;I have webPage with a dropDownList with the items about countries and phone numbers. Something like:
&lt;br&gt;&lt;i&gt;Albania &amp;nbsp; &amp;nbsp;+355
&lt;br&gt;Angola &amp;nbsp; &amp;nbsp; +244
&lt;br&gt;Argentina &amp;nbsp;+54
&lt;br&gt;Australia &amp;nbsp; +61
&lt;br&gt;&amp;nbsp; &amp;nbsp;(...) &amp;nbsp; &amp;nbsp; (...)&lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Then I have a textField where I want to get the phone country phone number selected by the user.
&lt;br&gt;&lt;br&gt;So, the dropDownList was selected as &amp;quot;Auto submit on change&amp;quot;, I did a lot of diferent code tests but it never works. Only if a button is pressed (because it renders the webpage...)
&lt;br&gt;&lt;br&gt;The idea is, the dropdown list name country is selected and, automatically, the textField get the phone number.
&lt;br&gt;&lt;br&gt;Any suggestions to resolve this question ? &amp;nbsp;&lt;img class='smiley' src='http://www.nabble.com/images/smiley/anim_confused.gif' /&gt;&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;Jose
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Problem-in-DropDownList-AutoSubmit-onChange-tp18198002p18207898.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18207843</id>
	<title>Drop down list values from both Database and custom</title>
	<published>2008-06-30T18:58:48Z</published>
	<updated>2008-06-30T18:58:48Z</updated>
	<author>
		<name>dbsarvesh</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&amp;nbsp; &amp;nbsp;I have a drop down and am populating it from one of the table from the DB. My requirement is to add one more general custom option to that drop down. Please suggest me how can I do that?
&lt;br&gt;&amp;nbsp; &amp;nbsp;I tried to get the rowset and by looping through the rowset created the options and added them like this
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CachedRowSetDataProvider dp = getVesselsDataProvider2();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CachedRowSet crs = dp.getCachedRowSet();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crs.execute();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Option[] listOpts = new Option[crs.size() + 1];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int i=0;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listOpts[i] = new Option(&amp;quot;&amp;quot;,&amp;quot;ANY&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (crs.next()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Option type is &amp;quot; + crs.getString(1));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listOpts[i++] = new Option(crs.getString(1),crs.getString(1));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dropDown2DefaultOptions.setOptions(listOpts);
&lt;br&gt;&lt;br&gt;But when I am assigning this dropDown2DefaultOptions from the design to the drop Down, I am getting 500 error. Please let me know how to proceed.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Subhash&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Drop-down-list-values-from-both-Database-and-custom-tp18207843p18207843.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18200405</id>
	<title>Re: Problem in DropDownList AutoSubmit onChange</title>
	<published>2008-06-30T10:29:03Z</published>
	<updated>2008-06-30T10:29:03Z</updated>
	<author>
		<name>Futaleufu_John</name>
	</author>
	<content type="html">Could you provide us with the code you used? Also could you include where you put the code; for example, prerender, processValueChange, etc.
&lt;br&gt;&lt;br&gt;Is the list data bound? What is the data type of the value field binding.
&lt;br&gt;&lt;br&gt;Does the value field need a converter, which it does for anything other than a String?&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Problem-in-DropDownList-AutoSubmit-onChange-tp18198002p18200405.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18198002</id>
	<title>Problem in DropDownList AutoSubmit onChange</title>
	<published>2008-06-30T08:31:36Z</published>
	<updated>2008-06-30T08:31:36Z</updated>
	<author>
		<name>ammaia</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I have webPage with a dropDownList with the items about countries and phone numbers. Something like:
&lt;br&gt;&lt;i&gt;Albania &amp;nbsp; &amp;nbsp;+355
&lt;br&gt;Angola &amp;nbsp; &amp;nbsp; +244
&lt;br&gt;Argentina &amp;nbsp;+54
&lt;br&gt;Australia &amp;nbsp; +61
&lt;br&gt;&amp;nbsp; &amp;nbsp;(...) &amp;nbsp; &amp;nbsp; (...)&lt;/i&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Then I have a textField where I want to get the phone country phone number selected by the user.
&lt;br&gt;&lt;br&gt;So, the dropDownList was selected as &amp;quot;Auto submit on change&amp;quot;, I did a lot of diferent code tests but it never works. Only if a button is pressed (because it renders the webpage...)
&lt;br&gt;&lt;br&gt;The idea is, the dropdown list name country is selected and, automatically, the textField get the phone number.
&lt;br&gt;&lt;br&gt;Any suggestions to resolve this question ? &amp;nbsp;&lt;img class='smiley' src='http://www.nabble.com/images/smiley/anim_confused.gif' /&gt;&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;Jose
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Problem-in-DropDownList-AutoSubmit-onChange-tp18198002p18198002.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18142076</id>
	<title>Re: CHARTS ON VISUAL WEB JSF PAGE: HOW TO?</title>
	<published>2008-06-26T11:36:51Z</published>
	<updated>2008-06-26T11:36:51Z</updated>
	<author>
		<name>Rick Fincher</name>
	</author>
	<content type="html">Hi David,
&lt;br&gt;&lt;br&gt;That was basically just a copy and paste of a servlet I'm using, so it 
&lt;br&gt;will take a little modifying. &amp;nbsp;It's not commented and has a few 
&lt;br&gt;extraneous things in there, so feel free to ask for more info on stuff.
&lt;br&gt;&lt;br&gt;Rick
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;thompsonwd40@...&lt;/a&gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Rick, thank you for your time &amp; effort on this. &amp;nbsp;I must chew on this a bit. &amp;nbsp;Best regards! &amp;nbsp;David
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;-------------- Original message ----------------------
&lt;br&gt;&amp;gt; From: Rick Fincher &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rnf@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Hi David,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I don't know what you deployment environment is but applets can be a 
&lt;br&gt;&amp;gt;&amp;gt; problem. &amp;nbsp;There no guarantee that the user can run them (unless you are 
&lt;br&gt;&amp;gt;&amp;gt; in an environment where you know what the user has on his machine).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; They also have a lot of overhead, essentially a Java program gets 
&lt;br&gt;&amp;gt;&amp;gt; downloaded to your computer. &amp;nbsp;That's a big lump of stuff for the first 
&lt;br&gt;&amp;gt;&amp;gt; load. &amp;nbsp;If you want to do live animation, though, it is a good way to go.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The nice thing about the servlet route is that to the browser it looks 
&lt;br&gt;&amp;gt;&amp;gt; like a plain old image.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The stuff bundled with the Java SDK is Java 2D, it works really great. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; You can draw your own pictures with it, add text in whatever font and 
&lt;br&gt;&amp;gt;&amp;gt; color and rotation you want, then rotate, scale, etc. to your hearts 
&lt;br&gt;&amp;gt;&amp;gt; content.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; All JFreeChart does is give you a library that figures out all the 
&lt;br&gt;&amp;gt;&amp;gt; drawing stuff for you. &amp;nbsp;You give it some data, titles, subtitles, grid 
&lt;br&gt;&amp;gt;&amp;gt; types (logarithimic, plain), and it does the picture.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The servlet below takes a stock number, size, and rotation value from 
&lt;br&gt;&amp;gt;&amp;gt; the url and pulls an image from the database, scales it, rotates it 
&lt;br&gt;&amp;gt;&amp;gt; clockwise or ccw by 90 degrees, and returns the image. &amp;nbsp;Instead of the 
&lt;br&gt;&amp;gt;&amp;gt; SQL stuff you can use any Java code to create the image. &amp;nbsp;Most of the 
&lt;br&gt;&amp;gt;&amp;gt; servlet deals with the SQL, which you can get rid of.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The url looks like: 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;&lt;a href=&quot;http://myServer.com/faces/DisplayImage?STOCK_NUMBER=123&amp;SIZE=4&amp;ROTATION=NONE&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://myServer.com/faces/DisplayImage?STOCK_NUMBER=123&amp;SIZE=4&amp;ROTATION=NONE&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Just bind an image url to a method that returns a string like the above 
&lt;br&gt;&amp;gt;&amp;gt; (with your parameters in it) converted to a url, and the servlet creates 
&lt;br&gt;&amp;gt;&amp;gt; the picture and it appears in your JSF page in the space provided for 
&lt;br&gt;&amp;gt;&amp;gt; the image..
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Just modify the &amp;quot;getImage&amp;quot; method below to draw your own picture and you 
&lt;br&gt;&amp;gt;&amp;gt; can see how it works. &amp;nbsp;Then you can trash all the SQL stuff.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; In my case, I created the buffered image from a byte array from the 
&lt;br&gt;&amp;gt;&amp;gt; database. &amp;nbsp;To create a new buffered image just do something like:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; int imageHeight=200, imageWidth=300;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; |*resultImage = new* BufferedImage(imageWidth, imageHeight, 
&lt;br&gt;&amp;gt;&amp;gt; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Then create your Graphics2D from that BufferedImage, draw what you want on it 
&lt;br&gt;&amp;gt;&amp;gt; and return the bufferedImage. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; The jpeg codec converts it for you and the image gets sent back to the browser
&lt;br&gt;&amp;gt;&amp;gt; |
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; The rotation values can be &amp;quot;CW&amp;quot;, &amp;quot;CCW&amp;quot;, or &amp;quot;NONE&amp;quot;. &amp;nbsp;It defaults to 90 
&lt;br&gt;&amp;gt;&amp;gt; degrees, but you can add a parmeter to let the user input that if you 
&lt;br&gt;&amp;gt;&amp;gt; want. &amp;nbsp;I think I have the scales set here to between 1 and 7, but that 
&lt;br&gt;&amp;gt;&amp;gt; is arbitrary, change it if you want.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Rick
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; code -------
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; package mypackage;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; import com.sun.image.codec.jpeg.JPEGCodec;
&lt;br&gt;&amp;gt;&amp;gt; import com.sun.image.codec.jpeg.JPEGImageEncoder;
&lt;br&gt;&amp;gt;&amp;gt; import java.awt.Graphics2D;
&lt;br&gt;&amp;gt;&amp;gt; import java.awt.RenderingHints;
&lt;br&gt;&amp;gt;&amp;gt; import java.awt.geom.AffineTransform;
&lt;br&gt;&amp;gt;&amp;gt; import java.awt.image.BufferedImage;
&lt;br&gt;&amp;gt;&amp;gt; import java.io.*;
&lt;br&gt;&amp;gt;&amp;gt; import java.io.IOException;
&lt;br&gt;&amp;gt;&amp;gt; import java.sql.Connection;
&lt;br&gt;&amp;gt;&amp;gt; import java.sql.ResultSet;
&lt;br&gt;&amp;gt;&amp;gt; import java.sql.Statement;
&lt;br&gt;&amp;gt;&amp;gt; import javax.imageio.ImageIO;
&lt;br&gt;&amp;gt;&amp;gt; import javax.naming.Context;
&lt;br&gt;&amp;gt;&amp;gt; import javax.naming.InitialContext;
&lt;br&gt;&amp;gt;&amp;gt; import javax.naming.NamingException;
&lt;br&gt;&amp;gt;&amp;gt; import javax.servlet.ServletConfig;
&lt;br&gt;&amp;gt;&amp;gt; import javax.servlet.ServletException;
&lt;br&gt;&amp;gt;&amp;gt; import javax.servlet.ServletOutputStream;
&lt;br&gt;&amp;gt;&amp;gt; import javax.servlet.http.HttpServlet;
&lt;br&gt;&amp;gt;&amp;gt; import javax.servlet.http.HttpServletRequest;
&lt;br&gt;&amp;gt;&amp;gt; import javax.servlet.http.HttpServletResponse;
&lt;br&gt;&amp;gt;&amp;gt; import javax.sql.DataSource;
&lt;br&gt;&amp;gt;&amp;gt; import javax.swing.JFrame;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; /**
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;*
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;* @author rick
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;* @version
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;*/
&lt;br&gt;&amp;gt;&amp;gt; public class DisplayImage extends HttpServlet {
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; String size = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; String rotation = null;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Creates a new instance of DisplayImage */
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public DisplayImage() {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public void init(ServletConfig config) throws ServletException {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.init(config);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public void destroy() {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected void processRequest(HttpServletRequest request, 
&lt;br&gt;&amp;gt;&amp;gt; HttpServletResponse response)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws ServletException, IOException {
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String id = request.getParameter(&amp;quot;STOCK_NUMBER&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size = request.getParameter(&amp;quot;SIZE&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rotation = request.getParameter(&amp;quot;ROTATION&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String ct = request.getParameter(&amp;quot;contenttype&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((ct == null) || (ct.equals(&amp;quot;&amp;quot;))) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ct = &amp;quot;image/pjpeg&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ct=&amp;quot;image/bmp&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Now displaying image with ID: &amp;quot; + id);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ServletOutputStream out = response.getOutputStream();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //response.setContentType(ct);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.setContentType(&amp;quot;image/jpeg&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; encoder.encode(this.getImage(id));
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //out.write(this.getImage(id));
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (java.io.IOException ioe) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // some kind of io glitch here but it works!
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e.getMessage());
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param request servlet request
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param response servlet response
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected void doGet(HttpServletRequest request, HttpServletResponse 
&lt;br&gt;&amp;gt;&amp;gt; response)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws ServletException, IOException {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; processRequest(request, response);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param request servlet request
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param response servlet response
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected void doPost(HttpServletRequest request, 
&lt;br&gt;&amp;gt;&amp;gt; HttpServletResponse response)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws ServletException, IOException {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; processRequest(request, response);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Returns a short description of the servlet.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public String getServletInfo() {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &amp;quot;Displays a picture from the database identified by a 
&lt;br&gt;&amp;gt;&amp;gt; parameter: STOCK_NUMBER&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; private String getDefaultContentType(String id) throws IOException {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Statement sta = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Connection conn = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSet rs = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String resultType = &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (id == null) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataSource ds = getJdbcMysqlConnectionPool();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn = ds.getConnection();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta = conn.createStatement();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs = sta.executeQuery(&amp;quot;SELECT IMAGE_TYPE FROM my_images 
&lt;br&gt;&amp;gt;&amp;gt; where STOCK_NUMBER=&amp;quot; + id);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (rs.next()) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resultType = rs.getString(&amp;quot;IMAGE_TYPE&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Could not find image with the 
&lt;br&gt;&amp;gt;&amp;gt; STOCK_NUMBER specified or there is a problem with the database connection&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e.getMessage());
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } finally {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception ex) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log(&amp;quot;Error Closing connection &amp;quot;, ex);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return resultType;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; private BufferedImage getImage(String id) throws IOException {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Statement sta = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Connection conn = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSet rs = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] resultImage = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String imageType = &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (id == null) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataSource ds = getJdbcMysqlConnectionPool();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn = ds.getConnection();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta = conn.createStatement();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs = sta.executeQuery(&amp;quot;SELECT IMAGE_BLOB, IMAGE_TYPE FROM 
&lt;br&gt;&amp;gt;&amp;gt; my_images where STOCK_NUMBER=&amp;quot; + id);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (rs.next()) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resultImage = rs.getBytes(&amp;quot;IMAGE_BLOB&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imageType = rs.getString(&amp;quot;IMAGE_TYPE&amp;quot;).substring(6);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Could not find image with the ID 
&lt;br&gt;&amp;gt;&amp;gt; specified or there is a problem with the database connection&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e.getMessage());
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } finally {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn.close();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception ex) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log(&amp;quot;Error Closing connection &amp;quot;, ex);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return getScaledImage(resultImage);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; public BufferedImage getScaledImage(byte[] imageBytes) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ByteArrayInputStream byteInput = new 
&lt;br&gt;&amp;gt;&amp;gt; ByteArrayInputStream(imageBytes);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage image;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage scaledImage = null;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double scale;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AffineTransform tx;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image = ImageIO.read(byteInput);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double externalSize = 2.0d;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Double tmpD = Double.parseDouble(size);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tmpD != null) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; externalSize = tmpD.doubleValue();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scale = externalSize / 4.0d;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RenderingHints hints = new RenderingHints(null);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (image != null) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double w, h;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; w = (double) image.getWidth() * scale;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; h = (double) image.getHeight() * scale;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx = new AffineTransform();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.setToIdentity();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (rotation.equals(&amp;quot;CW&amp;quot;)) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.rotate(Math.toRadians(90), w / 2, h / 2);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaledImage = new BufferedImage(
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) h) &amp;lt; 1 ? 1 : (int) h, // don't allow 
&lt;br&gt;&amp;gt;&amp;gt; width to be less than 1
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) w) &amp;lt; 1 ? 1 : (int) w, // don't allow 
&lt;br&gt;&amp;gt;&amp;gt; height to be less than 1
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.translate(-((h - w)/2), -((h - w)/2));
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (rotation.equals(&amp;quot;CCW&amp;quot;)) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.rotate(-Math.toRadians(90), w / 2, h / 2);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaledImage = new BufferedImage(
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) h) &amp;lt; 1 ? 1 : (int) h, // don't allow 
&lt;br&gt;&amp;gt;&amp;gt; width to be less than 1
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) w) &amp;lt; 1 ? 1 : (int) w, // don't allow 
&lt;br&gt;&amp;gt;&amp;gt; height to be less than 1
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.translate((h - w)/2, (h - w)/2);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaledImage = new BufferedImage(
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) w) &amp;lt; 1 ? 1 : (int) w, // don't allow 
&lt;br&gt;&amp;gt;&amp;gt; width to be less than 1
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) h) &amp;lt; 1 ? 1 : (int) h, // don't allow 
&lt;br&gt;&amp;gt;&amp;gt; height to be less than 1
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.scale(scale, scale);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Graphics2D g2d = scaledImage.createGraphics();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g2d.drawRenderedImage(image, tx);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g2d.dispose();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException ex) {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ex.printStackTrace();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return scaledImage;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; private DataSource getJdbcMysqlConnectionPool() throws NamingException {
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context c = new InitialContext();
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (DataSource) c.lookup(&amp;quot;java:comp/env/jdbc/my_MySQL&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; HandyGeek wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Soon, I will need to write some bar charts too. &amp;nbsp;I have read about 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; some Java demo graph examples bundled with the J2SE SDK. &amp;nbsp;Then, (and 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; this is pure theory on my part) I plan to write an applet with the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; graph component, and embed it in my VWP page. &amp;nbsp;Unless somebody else 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; has a more elegant solution (and I hope there is), this is my stab at 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it. &amp;nbsp;I will be following this thread with a lot of interest.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; /David
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; rrugemalira wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Platform: NetBeans IDE 6.1
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Has anyone done bar-charts recently on a visual web jsf page? Please,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; briefly let me know how you proceeded to generate bar chart and which
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; component library you used.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18142076&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/CHARTS-ON-VISUAL-WEB-JSF-PAGE%3A-HOW-TO--tp18119116p18142076.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18136542</id>
	<title>Re: CHARTS ON VISUAL WEB JSF PAGE: HOW TO?</title>
	<published>2008-06-26T08:19:59Z</published>
	<updated>2008-06-26T08:19:59Z</updated>
	<author>
		<name>HandyGeek</name>
	</author>
	<content type="html">Rick, thank you for your time &amp; effort on this. &amp;nbsp;I must chew on this a bit. &amp;nbsp;Best regards! &amp;nbsp;David
&lt;br&gt;&lt;br&gt;&amp;nbsp;-------------- Original message ----------------------
&lt;br&gt;From: Rick Fincher &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136542&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rnf@...&lt;/a&gt;&amp;gt;
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi David,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't know what you deployment environment is but applets can be a 
&lt;br&gt;&amp;gt; problem. &amp;nbsp;There no guarantee that the user can run them (unless you are 
&lt;br&gt;&amp;gt; in an environment where you know what the user has on his machine).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; They also have a lot of overhead, essentially a Java program gets 
&lt;br&gt;&amp;gt; downloaded to your computer. &amp;nbsp;That's a big lump of stuff for the first 
&lt;br&gt;&amp;gt; load. &amp;nbsp;If you want to do live animation, though, it is a good way to go.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The nice thing about the servlet route is that to the browser it looks 
&lt;br&gt;&amp;gt; like a plain old image.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The stuff bundled with the Java SDK is Java 2D, it works really great. &amp;nbsp;
&lt;br&gt;&amp;gt; You can draw your own pictures with it, add text in whatever font and 
&lt;br&gt;&amp;gt; color and rotation you want, then rotate, scale, etc. to your hearts 
&lt;br&gt;&amp;gt; content.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; All JFreeChart does is give you a library that figures out all the 
&lt;br&gt;&amp;gt; drawing stuff for you. &amp;nbsp;You give it some data, titles, subtitles, grid 
&lt;br&gt;&amp;gt; types (logarithimic, plain), and it does the picture.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The servlet below takes a stock number, size, and rotation value from 
&lt;br&gt;&amp;gt; the url and pulls an image from the database, scales it, rotates it 
&lt;br&gt;&amp;gt; clockwise or ccw by 90 degrees, and returns the image. &amp;nbsp;Instead of the 
&lt;br&gt;&amp;gt; SQL stuff you can use any Java code to create the image. &amp;nbsp;Most of the 
&lt;br&gt;&amp;gt; servlet deals with the SQL, which you can get rid of.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The url looks like: 
&lt;br&gt;&amp;gt; &amp;quot;&lt;a href=&quot;http://myServer.com/faces/DisplayImage?STOCK_NUMBER=123&amp;SIZE=4&amp;ROTATION=NONE&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://myServer.com/faces/DisplayImage?STOCK_NUMBER=123&amp;SIZE=4&amp;ROTATION=NONE&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Just bind an image url to a method that returns a string like the above 
&lt;br&gt;&amp;gt; (with your parameters in it) converted to a url, and the servlet creates 
&lt;br&gt;&amp;gt; the picture and it appears in your JSF page in the space provided for 
&lt;br&gt;&amp;gt; the image..
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Just modify the &amp;quot;getImage&amp;quot; method below to draw your own picture and you 
&lt;br&gt;&amp;gt; can see how it works. &amp;nbsp;Then you can trash all the SQL stuff.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In my case, I created the buffered image from a byte array from the 
&lt;br&gt;&amp;gt; database. &amp;nbsp;To create a new buffered image just do something like:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; int imageHeight=200, imageWidth=300;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; |*resultImage = new* BufferedImage(imageWidth, imageHeight, 
&lt;br&gt;&amp;gt; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Then create your Graphics2D from that BufferedImage, draw what you want on it 
&lt;br&gt;&amp;gt; and return the bufferedImage. &amp;nbsp;
&lt;br&gt;&amp;gt; The jpeg codec converts it for you and the image gets sent back to the browser
&lt;br&gt;&amp;gt; |
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The rotation values can be &amp;quot;CW&amp;quot;, &amp;quot;CCW&amp;quot;, or &amp;quot;NONE&amp;quot;. &amp;nbsp;It defaults to 90 
&lt;br&gt;&amp;gt; degrees, but you can add a parmeter to let the user input that if you 
&lt;br&gt;&amp;gt; want. &amp;nbsp;I think I have the scales set here to between 1 and 7, but that 
&lt;br&gt;&amp;gt; is arbitrary, change it if you want.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Rick
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; code -------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; package mypackage;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; import com.sun.image.codec.jpeg.JPEGCodec;
&lt;br&gt;&amp;gt; import com.sun.image.codec.jpeg.JPEGImageEncoder;
&lt;br&gt;&amp;gt; import java.awt.Graphics2D;
&lt;br&gt;&amp;gt; import java.awt.RenderingHints;
&lt;br&gt;&amp;gt; import java.awt.geom.AffineTransform;
&lt;br&gt;&amp;gt; import java.awt.image.BufferedImage;
&lt;br&gt;&amp;gt; import java.io.*;
&lt;br&gt;&amp;gt; import java.io.IOException;
&lt;br&gt;&amp;gt; import java.sql.Connection;
&lt;br&gt;&amp;gt; import java.sql.ResultSet;
&lt;br&gt;&amp;gt; import java.sql.Statement;
&lt;br&gt;&amp;gt; import javax.imageio.ImageIO;
&lt;br&gt;&amp;gt; import javax.naming.Context;
&lt;br&gt;&amp;gt; import javax.naming.InitialContext;
&lt;br&gt;&amp;gt; import javax.naming.NamingException;
&lt;br&gt;&amp;gt; import javax.servlet.ServletConfig;
&lt;br&gt;&amp;gt; import javax.servlet.ServletException;
&lt;br&gt;&amp;gt; import javax.servlet.ServletOutputStream;
&lt;br&gt;&amp;gt; import javax.servlet.http.HttpServlet;
&lt;br&gt;&amp;gt; import javax.servlet.http.HttpServletRequest;
&lt;br&gt;&amp;gt; import javax.servlet.http.HttpServletResponse;
&lt;br&gt;&amp;gt; import javax.sql.DataSource;
&lt;br&gt;&amp;gt; import javax.swing.JFrame;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; /**
&lt;br&gt;&amp;gt; &amp;nbsp;*
&lt;br&gt;&amp;gt; &amp;nbsp;* @author rick
&lt;br&gt;&amp;gt; &amp;nbsp;* @version
&lt;br&gt;&amp;gt; &amp;nbsp;*/
&lt;br&gt;&amp;gt; public class DisplayImage extends HttpServlet {
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; String size = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; String rotation = null;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Creates a new instance of DisplayImage */
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public DisplayImage() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public void init(ServletConfig config) throws ServletException {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.init(config);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public void destroy() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected void processRequest(HttpServletRequest request, 
&lt;br&gt;&amp;gt; HttpServletResponse response)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws ServletException, IOException {
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String id = request.getParameter(&amp;quot;STOCK_NUMBER&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; size = request.getParameter(&amp;quot;SIZE&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rotation = request.getParameter(&amp;quot;ROTATION&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String ct = request.getParameter(&amp;quot;contenttype&amp;quot;);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((ct == null) || (ct.equals(&amp;quot;&amp;quot;))) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ct = &amp;quot;image/pjpeg&amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ct=&amp;quot;image/bmp&amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Now displaying image with ID: &amp;quot; + id);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ServletOutputStream out = response.getOutputStream();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //response.setContentType(ct);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.setContentType(&amp;quot;image/jpeg&amp;quot;);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; encoder.encode(this.getImage(id));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //out.write(this.getImage(id));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (java.io.IOException ioe) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // some kind of io glitch here but it works!
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e.getMessage());
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Handles the HTTP &amp;lt;code&amp;gt;GET&amp;lt;/code&amp;gt; method.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param request servlet request
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param response servlet response
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected void doGet(HttpServletRequest request, HttpServletResponse 
&lt;br&gt;&amp;gt; response)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws ServletException, IOException {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; processRequest(request, response);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Handles the HTTP &amp;lt;code&amp;gt;POST&amp;lt;/code&amp;gt; method.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param request servlet request
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;* @param response servlet response
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; protected void doPost(HttpServletRequest request, 
&lt;br&gt;&amp;gt; HttpServletResponse response)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws ServletException, IOException {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; processRequest(request, response);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; /** Returns a short description of the servlet.
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;*/
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public String getServletInfo() {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return &amp;quot;Displays a picture from the database identified by a 
&lt;br&gt;&amp;gt; parameter: STOCK_NUMBER&amp;quot;;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; private String getDefaultContentType(String id) throws IOException {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Statement sta = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Connection conn = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSet rs = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String resultType = &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (id == null) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataSource ds = getJdbcMysqlConnectionPool();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn = ds.getConnection();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta = conn.createStatement();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs = sta.executeQuery(&amp;quot;SELECT IMAGE_TYPE FROM my_images 
&lt;br&gt;&amp;gt; where STOCK_NUMBER=&amp;quot; + id);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (rs.next()) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resultType = rs.getString(&amp;quot;IMAGE_TYPE&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Could not find image with the 
&lt;br&gt;&amp;gt; STOCK_NUMBER specified or there is a problem with the database connection&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs.close();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e.getMessage());
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } finally {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta.close();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn.close();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception ex) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log(&amp;quot;Error Closing connection &amp;quot;, ex);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return resultType;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; private BufferedImage getImage(String id) throws IOException {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Statement sta = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Connection conn = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSet rs = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] resultImage = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String imageType = &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (id == null) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataSource ds = getJdbcMysqlConnectionPool();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn = ds.getConnection();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta = conn.createStatement();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs = sta.executeQuery(&amp;quot;SELECT IMAGE_BLOB, IMAGE_TYPE FROM 
&lt;br&gt;&amp;gt; my_images where STOCK_NUMBER=&amp;quot; + id);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (rs.next()) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resultImage = rs.getBytes(&amp;quot;IMAGE_BLOB&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imageType = rs.getString(&amp;quot;IMAGE_TYPE&amp;quot;).substring(6);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;Could not find image with the ID 
&lt;br&gt;&amp;gt; specified or there is a problem with the database connection&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs.close();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e.getMessage());
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } finally {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sta.close();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn.close();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception ex) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log(&amp;quot;Error Closing connection &amp;quot;, ex);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return getScaledImage(resultImage);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public BufferedImage getScaledImage(byte[] imageBytes) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ByteArrayInputStream byteInput = new 
&lt;br&gt;&amp;gt; ByteArrayInputStream(imageBytes);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage image;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage scaledImage = null;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double scale;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AffineTransform tx;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; image = ImageIO.read(byteInput);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double externalSize = 2.0d;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Double tmpD = Double.parseDouble(size);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tmpD != null) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; externalSize = tmpD.doubleValue();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scale = externalSize / 4.0d;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RenderingHints hints = new RenderingHints(null);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (image != null) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; double w, h;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; w = (double) image.getWidth() * scale;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; h = (double) image.getHeight() * scale;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx = new AffineTransform();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.setToIdentity();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (rotation.equals(&amp;quot;CW&amp;quot;)) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.rotate(Math.toRadians(90), w / 2, h / 2);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaledImage = new BufferedImage(
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) h) &amp;lt; 1 ? 1 : (int) h, // don't allow 
&lt;br&gt;&amp;gt; width to be less than 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) w) &amp;lt; 1 ? 1 : (int) w, // don't allow 
&lt;br&gt;&amp;gt; height to be less than 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.translate(-((h - w)/2), -((h - w)/2));
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (rotation.equals(&amp;quot;CCW&amp;quot;)) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.rotate(-Math.toRadians(90), w / 2, h / 2);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaledImage = new BufferedImage(
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) h) &amp;lt; 1 ? 1 : (int) h, // don't allow 
&lt;br&gt;&amp;gt; width to be less than 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) w) &amp;lt; 1 ? 1 : (int) w, // don't allow 
&lt;br&gt;&amp;gt; height to be less than 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.translate((h - w)/2, (h - w)/2);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scaledImage = new BufferedImage(
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) w) &amp;lt; 1 ? 1 : (int) w, // don't allow 
&lt;br&gt;&amp;gt; width to be less than 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ((int) h) &amp;lt; 1 ? 1 : (int) h, // don't allow 
&lt;br&gt;&amp;gt; height to be less than 1
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tx.scale(scale, scale);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Graphics2D g2d = scaledImage.createGraphics();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g2d.drawRenderedImage(image, tx);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g2d.dispose();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IOException ex) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ex.printStackTrace();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return scaledImage;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; private DataSource getJdbcMysqlConnectionPool() throws NamingException {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Context c = new InitialContext();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return (DataSource) c.lookup(&amp;quot;java:comp/env/jdbc/my_MySQL&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HandyGeek wrote:
&lt;br&gt;&amp;gt; &amp;gt; Soon, I will need to write some bar charts too. &amp;nbsp;I have read about 
&lt;br&gt;&amp;gt; &amp;gt; some Java demo graph examples bundled with the J2SE SDK. &amp;nbsp;Then, (and 
&lt;br&gt;&amp;gt; &amp;gt; this is pure theory on my part) I plan to write an applet with the 
&lt;br&gt;&amp;gt; &amp;gt; graph component, and embed it in my VWP page. &amp;nbsp;Unless somebody else 
&lt;br&gt;&amp;gt; &amp;gt; has a more elegant solution (and I hope there is), this is my stab at 
&lt;br&gt;&amp;gt; &amp;gt; it. &amp;nbsp;I will be following this thread with a lot of interest.
&lt;br&gt;&amp;gt; &amp;gt; /David
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; rrugemalira wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Platform: NetBeans IDE 6.1
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Has anyone done bar-charts recently on a visual web jsf page? Please,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; briefly let me know how you proceeded to generate bar chart and which
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; component library you used.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136542&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136542&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136542&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136542&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136542&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136542&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/CHARTS-ON-VISUAL-WEB-JSF-PAGE%3A-HOW-TO--tp18119116p18136542.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18136271</id>
	<title>Re: CHARTS ON VISUAL WEB JSF PAGE: HOW TO?</title>
	<published>2008-06-26T08:09:11Z</published>
	<updated>2008-06-26T08:09:11Z</updated>
	<author>
		<name>HandyGeek</name>
	</author>
	<content type="html">Greetings Glenn,
&lt;br&gt;My experience with Visual Web, while at times frustrating, is overall positive. &amp;nbsp;I now have several active applications in production, all of them exclusively based on VWP. &amp;nbsp;For right now, my user base is small, but that will change in the near future - hence my concern with your comment. &amp;nbsp;Could you elaborate as to why you limit VWP to prototyping, and not deployment?
&lt;br&gt;&lt;br&gt;rrugemalira,
&lt;br&gt;My apologies for taking over your posting!
&lt;br&gt;&lt;br&gt;/David
&lt;br&gt;&lt;br&gt;&amp;nbsp;-------------- Original message ----------------------
&lt;br&gt;From: Glenn Holmer &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136271&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gholmer@...&lt;/a&gt;&amp;gt;
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Wed, 2008-06-25 at 11:47 -0700, rrugemalira wrote:
&lt;br&gt;&amp;gt; &amp;gt; Has anyone done bar-charts recently on a visual web jsf page? Please,
&lt;br&gt;&amp;gt; &amp;gt; briefly let me know how you proceeded to generate bar chart and which
&lt;br&gt;&amp;gt; &amp;gt; component library you used.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ICEfaces (icefaces.org) has a chart component that can be used with the
&lt;br&gt;&amp;gt; visual web editor (although generally speaking, I would not recommend
&lt;br&gt;&amp;gt; the visual web editor for anything except prototyping).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; ____________________________________________________________
&lt;br&gt;&amp;gt; Glenn Holmer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136271&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gholmer@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Software Engineer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;phone: 414-908-1809
&lt;br&gt;&amp;gt; Weyco Group, Inc. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fax: 414-908-1601
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136271&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;&amp;gt; For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136271&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136271&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18136271&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/CHARTS-ON-VISUAL-WEB-JSF-PAGE%3A-HOW-TO--tp18119116p18136271.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18133262</id>
	<title>Re: CHARTS ON VISUAL WEB JSF PAGE: HOW TO?</title>
	<published>2008-06-26T06:02:19Z</published>
	<updated>2008-06-26T06:02:19Z</updated>
	<author>
		<name>Glenn Holmer</name>
	</author>
	<content type="html">On Wed, 2008-06-25 at 11:47 -0700, rrugemalira wrote:
&lt;br&gt;&amp;gt; Has anyone done bar-charts recently on a visual web jsf page? Please,
&lt;br&gt;&amp;gt; briefly let me know how you proceeded to generate bar chart and which
&lt;br&gt;&amp;gt; component library you used.
&lt;br&gt;&lt;br&gt;ICEfaces (icefaces.org) has a chart component that can be used with the
&lt;br&gt;visual web editor (although generally speaking, I would not recommend
&lt;br&gt;the visual web editor for anything except prototyping).
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;____________________________________________________________
&lt;br&gt;Glenn Holmer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18133262&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gholmer@...&lt;/a&gt;
&lt;br&gt;Software Engineer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;phone: 414-908-1809
&lt;br&gt;Weyco Group, Inc. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fax: 414-908-1601
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18133262&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18133262&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;users-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/Visual-Web---Users-f24580.html&quot; embed=&quot;fixTarget[24580]&quot; target=&quot;_top&quot; &gt;Visual Web - Users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/CHARTS-ON-VISUAL-WEB-JSF-PAGE%3A-HOW-TO--tp18119116p18133262.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18134726</id>
	<title>Re: CHARTS ON VISUAL WEB JSF PAGE: HOW TO?</title>
	<published>2008-06-25T19:27:16Z</published>
	<updated>2008-06-25T19:27:16Z</updated>
	<author>
		<name>Rick Fincher</name>
	</author>
	<content type="html">Hi David,
&lt;br&gt;&lt;br&gt;I don't know what you deployment environment is but applets can be a 
&lt;br&gt;problem. &amp;nbsp;There no guarantee that the user can run them (unless you are 
&lt;br&gt;in an environment where you know what the user has on his machine).
&lt;br&gt;&lt;br&gt;They also have a lot of overhead, essentially a Java program gets 
&lt;br&gt;downloaded to your computer. &amp;nbsp;That's a big lump of stuff for the first 
&lt;br&gt;load. &amp;nbsp;If you want to do live animation, though, it is a good way to go.
&lt;br&gt;&lt;br&gt;The nice thing about the servlet route is that to the browser it looks 
&lt;br&gt;like a plain old image.
&lt;br&gt;&lt;br&gt;The stuff bundled with the Java SDK is Java 2D, it works really great. &amp;nbsp;
&lt;br&gt;You can draw your own pictures with it, add text in whatever font and 
&lt;br&gt;color and rotation you want, then rotate, scale, etc. to your hearts 
&lt;br&gt;content.
&lt;br&gt;&lt;br&gt;All JFreeChart does is give you a library that figures out all the 
&lt;br&gt;drawing stuff for you. &amp;nbsp;You give it some data, titles, subtitles, grid 
&lt;br&gt;types (logarithimic, plain), and it does the picture.
&lt;br&gt;&lt;br&gt;The servlet below takes a stock number, size, and rotation value from 
&lt;br&gt;the url and pulls an image from the database, scales it, rotates it 
&lt;br&gt;clockwise or ccw by 90 degrees, and returns the image. &amp;nbsp;Instead of the 
&lt;br&gt;SQL stuff you can use any Java code to create the image. &amp;nbsp;Most of the 
&lt;br&gt;servlet deals with the SQL, which you can get rid of.
&lt;br&gt;&lt;br&gt;The url looks like: 
&lt;br&gt;&amp;quot;&lt;a href=&quot;http://myServer.com/faces/DisplayImage?STOCK_NUMBER=123&amp;SIZE=4&amp;ROTATION=NONE&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://myServer.com/faces/DisplayImage?STOCK_NUMBER=123&amp;SIZE=4&amp;ROTATION=NONE&lt;/a&gt;&lt;br&gt;&lt;br&gt;Just bind an image url to a method that returns a string like the above 
&lt;br&gt;(with your parameters in it) converted to a url, and the servlet creates 
&lt;br&gt;the picture and it appears in your JSF page in the space provided for 
&lt;br&gt;the image..
&lt;br&gt;&lt;br&gt;Just modify the &amp;quot;getImage&amp;quot; method below to draw your own picture and you 
&lt;br&gt;can see how it works. &amp;nbsp;Then you can trash all the SQL stuff.
&lt;br&gt;&lt;br&gt;In my case, I created the buffered image from a byte array from the 
&lt;br&gt;database. &amp;nbsp;To create a new buffered image just do something like:
&lt;br&gt;&lt;br&gt;int imageHeight=200, imageWidth=300;
&lt;br&gt;&lt;br&gt;|*resultImage = new* BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);
&lt;br&gt;&lt;br&gt;Then create your Graphics2D from that BufferedImage, draw what you want on it and return the bufferedImage. &amp;nbsp;
&lt;br&gt;The jpeg codec converts it for you and the image gets sent back to the browser
&lt;br&gt;|
&lt;br&gt;&lt;br&gt;&lt;br&gt;The rotation values can be &amp;quot;CW&amp;quot;, &amp;quot;CCW&amp;quot;, or &amp;quot;NONE&amp;quot;. &amp;nbsp;It defaults to 90 
&lt;br&gt;degrees, but you can add a parmeter to let the user input that if you 
&lt;br&gt;want. &amp;nbsp;I think I have the scales set here to between 1 and 7, but that 
&lt;br&gt;is arbitrary, change it if you want.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Rick
&lt;br&gt;&lt;br&gt;code -------
&lt;br&gt;&lt;br&gt;package mypackage;
&lt;br&gt;&lt;br&gt;import com.sun.image.codec.jpeg.JPEGCodec;
&lt;br&gt;import com.sun.image.codec.jpeg.JPEGImageEncoder;
&lt;br&gt;import java.awt.Graphics2D;
&lt;br&gt;import java.awt.RenderingHints;
&lt;br&gt;import java.awt.geom.AffineTransform;
&lt;br&gt;import java.awt.image.BufferedImage;
&lt;br&gt;import java.io.*;
&lt;br&gt;import java.io.IOException;
&lt;br&gt;import java.sql.Connection;
&lt;br&gt;import java.sql.ResultSet;
&lt;br&gt;import java.sql.Statement;
&lt;br&gt;import javax.imageio.ImageIO;
&lt;br&gt;import javax.naming.Context;
&lt;br&gt;import javax.naming.InitialContext;
&lt;br&gt;import javax.naming.NamingException;
&lt;br&gt;import javax.servlet.ServletConfig;
&lt;br&gt;import javax.servlet.ServletException;
&lt;br&gt;import javax.servlet.ServletOutputStream;
&lt;br&gt;import javax.servlet.http.HttpServlet;
&lt;br&gt;import javax.servlet.http.HttpServletRequest;
&lt;br&gt;import javax.servlet.http.HttpServletResponse;
&lt;br&gt;import javax.sql.DataSource;
&lt;br&gt;import javax.swing.JFrame;
&lt;br&gt;&lt;br&gt;/**
&lt;br&gt;&amp;nbsp;*
&lt;br&gt;&amp;nbsp;* @author rick
&lt;br&gt;&amp;nbsp;* @version
&lt;br&gt;&amp;nbsp;*/
&lt;br&gt;public class DisplayImage extends HttpServlet {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; String size = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; String rotation = null;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; /** Creates a new instance of DisplayImage */
&lt;br&gt;&amp;nbsp; &amp;nbsp; public DisplayImage() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void init(ServletConfig config) throws ServletException {
&lt;br&gt;&amp;nbsp; &amp;n