<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1260189105340784848</id><updated>2012-02-03T14:36:53.770-08:00</updated><category term='xml'/><category term='Struts'/><category term='Public render parameters'/><category term='Websphere Portal fix pact 6.1.5'/><category term='Host name change in Websphere Portal'/><category term='Portal'/><category term='JSR168'/><category term='JSF vs Struts'/><category term='eventing steps'/><category term='Configure LDAP with websphere portal'/><category term='skin code'/><category term='Webseal'/><category term='Clipping'/><category term='JSR286'/><category term='ITAM'/><category term='Websphere portal'/><category term='Webseal Login'/><category term='theme code'/><category term='WPS Custom Attributes'/><category term='Themes'/><category term='Portlet'/><category term='Upgrade WPS to 6.1.5'/><category term='Websphere'/><category term='wkplc.properties'/><category term='XML Access'/><category term='JSR 286  vs JSR 168'/><category term='JSR 286'/><category term='wimxmlextension.xml'/><category term='LDAP Host name'/><category term='JSF'/><category term='WebApp Integrator'/><category term='EAI'/><category term='TAM'/><category term='Skins'/><category term='specifications'/><category term='WPS and LDAP'/><category term='Tivoli Access Manager'/><category term='Custom Attributes in Websphere Portal'/><title type='text'>Java Portals</title><subtitle type='html'>Technical discussions on Java, J2EE, Portals</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6978371292953262133</id><published>2012-02-03T14:34:00.000-08:00</published><updated>2012-02-03T14:34:10.223-08:00</updated><title type='text'>HttpServletRequest and HttpServletResponse from portlet request</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;style type="text/css"&gt;&lt;/style&gt;&lt;span style="font-size: small;"&gt;Howto get HttpServletRequest and HttpServletResponse from portletrequest&lt;/span&gt;&lt;/div&gt;&lt;h3 style="font-family: Arial,Helvetica,sans-serif;"&gt; &lt;/h3&gt;&lt;div align="LEFT" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;We can only have portletRequest in the portlet. If weare setting anything in the HttpServletRequest it is not accessile inthe portlet. IBM provides an utility class which gives which convertsthe “portletRequest”  to HttpServletRequest.&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Thereare some scenario when you want to get httpServletRequest orhttpServletReponse from portletRequest.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;PortletUtil&lt;/b&gt;class available in the &lt;b&gt;com.ibm.ws.portletcontainer.portlet&lt;/b&gt;package in “com.ibm.ws.portletcontainer_6.1.0.jar” at“&lt;span style="font-size: x-small;"&gt;WebSphere/AppServer/plugins/&lt;/span&gt;”on server, through which you can directly get httpServletRequest,httpServletResponse, ServletContext and many more.&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-family: Arial,Helvetica,sans-serif; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Code to getHttpServletRequest fromportletRequest/renderRequest/actionRequest.&lt;br /&gt;&lt;br /&gt;HttpServletRequesthttpServletRequest=PortletUtils.getHttpServletRequest(renderRequest);&lt;br /&gt;&lt;br /&gt;There arecouple of utility methods available in PortletUtil which gives youServletContext, ServletConfig, PortletWindow,PortletApplicationDefinition etc.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6978371292953262133?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6978371292953262133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6978371292953262133&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6978371292953262133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6978371292953262133'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2012/02/httpservletrequest-and.html' title='HttpServletRequest and HttpServletResponse from portlet request'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-4067348618743162258</id><published>2012-02-03T14:32:00.000-08:00</published><updated>2012-02-03T14:34:45.617-08:00</updated><title type='text'></title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;style type="text/css"&gt; &lt;!--		@page { margin: 0.79in }		P { margin-bottom: 0.08in }	--&gt;&lt;/style&gt;&lt;span style="font-size: small;"&gt;WebSphereApplication Server Ships&lt;code style="font-family: Arial,Helvetica,sans-serif;"&gt; com.ibm.ws.webcontainer.httpsession.SessionInspectServlet&lt;/code&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;servlet that you can use to investigate what content is stored inHttpSession of your application. The SessionInspectServlet will tellyou&lt;/span&gt;&lt;/div&gt;&lt;ol style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Names	of the session attributes&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Size	of the data in session attribute&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;If	the attribute is serializable or not&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;Youmight want to use this when you start gettingNotSerializableException or you run into performance issue due tosize of data stored in session.&lt;br /&gt;&lt;br /&gt;Steps toadd SessionInspectorServlet to your web application&lt;/span&gt;			&lt;style type="text/css"&gt;	&lt;!--		@page { margin: 0.79in }		P { margin-bottom: 0.08in }	--&gt;&lt;/style&gt;&lt;span style="font-family: Arial,sans-serif;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-left: 40px;"&gt;&lt;span style="font-size: small;"&gt;Add	Session Inspector servlet to web.xml file of your web application.&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-HPusigeVNd0/Tyxf9vTgPuI/AAAAAAAAAEk/8pO7k5-KX1E/s1600/2011-12-03_14-12-46.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="75" src="http://1.bp.blogspot.com/-HPusigeVNd0/Tyxf9vTgPuI/AAAAAAAAAEk/8pO7k5-KX1E/s320/2011-12-03_14-12-46.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-left: 40px;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;code style="font-family: Arial,Helvetica,sans-serif;"&gt;Check the ibm-web-ext.xmi in the portlet WebContext&lt;/code&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-left: 40px;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-rWTjg8Ht7L4/Tyxf-OxgqNI/AAAAAAAAAEs/ejiGQsqawIE/s1600/2011-12-03_14-13-11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="115" src="http://3.bp.blogspot.com/-rWTjg8Ht7L4/Tyxf-OxgqNI/AAAAAAAAAEs/ejiGQsqawIE/s320/2011-12-03_14-13-11.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-left: 40px;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Install	and start your web application on server.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; margin-left: 40px;"&gt;&lt;span style="font-size: small;"&gt;This	is the output that i get for the  webapplication. I am not storing	anything in the session.&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-j7er9szECXk/Tyxf-Ct-rSI/AAAAAAAAAE0/dJJz4zk3aOU/s1600/Untitled+1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="99" src="http://2.bp.blogspot.com/-j7er9szECXk/Tyxf-Ct-rSI/AAAAAAAAAE0/dJJz4zk3aOU/s320/Untitled+1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;Access	the SessionInspectorServlet by going to	//&lt;code style="font-family: Arial,Helvetica,sans-serif;"&gt;SessionInspectServlet&lt;/code&gt;&lt;span style="font-family: Arial,Helvetica,sans-serif;"&gt;	url&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol start="3" style="font-family: Arial,Helvetica,sans-serif; text-align: left;"&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-4067348618743162258?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/4067348618743162258/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=4067348618743162258&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4067348618743162258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4067348618743162258'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2012/02/websphereapplication-server-ships-com.html' title=''/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-HPusigeVNd0/Tyxf9vTgPuI/AAAAAAAAAEk/8pO7k5-KX1E/s72-c/2011-12-03_14-12-46.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-4022550280187700669</id><published>2012-01-11T12:25:00.000-08:00</published><updated>2012-01-11T12:25:27.667-08:00</updated><title type='text'>Delete/Overwrite cookie from client/UI</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;function loaded()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.cookie = "v0=1;";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.cookie = "v1=2;";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(document.cookie);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function deletecookie()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var d = new Date();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.cookie = "v0=1;expires=" + d.toGMTString() + ";" + ";";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(document.cookie);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&amp;gt;&amp;gt;First call method loaded -- To see the loaded cookies.&lt;br /&gt; &amp;gt;&amp;gt; Then call deletecookie method to delete/overwrite the cookies.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;title&gt;test&lt;/title&gt;&lt;script language="Javascript"&gt;function loaded(){    document.cookie = "v0=1;";    document.cookie = "v1=2;";    alert(document.cookie);}function deletecook(){    var d = new Date();    document.cookie = "v0=1;expires=" + d.toGMTString() + ";" + ";";    alert(document.cookie); &lt;/script&gt;&lt;a href="javascript:deletecook();"&gt;delete cookie&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-4022550280187700669?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/4022550280187700669/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=4022550280187700669&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4022550280187700669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4022550280187700669'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2012/01/deleteoverwrite-cookie-from-clientui.html' title='Delete/Overwrite cookie from client/UI'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-4613772675860498802</id><published>2011-12-12T09:45:00.000-08:00</published><updated>2011-12-12T09:45:10.330-08:00</updated><title type='text'>Enabling traces in WebSphere Application Server</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Steps to enable traces&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif; text-align: left;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Open the WebSphere  Application Service Integrated Solutions Console. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt; &lt;/div&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-size: small;"&gt;Expand Troubleshooting  and select Logs and trace. &lt;/span&gt;  &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-size: small;"&gt;Select the server on  which you want to enable traces, and then select Diagnostic Trace. &lt;/span&gt;  &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-size: small;"&gt;Click the Runtime tab. &lt;/span&gt;  &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-size: small;"&gt;Click Change Log Detail  Levels. &lt;/span&gt;  &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;li&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-size: small;"&gt;Set the required trace  level, select Save runtime changes to configuration as well, and  click Apply.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;The  resulting traces of Member Manager will be written to  &lt;/span&gt;&lt;/span&gt;&lt;var&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/topic/com.ibm.wp.ent.doc/wps/wpsdirstr.html#wpsdirstr__wp_root"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;portal_server_root&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/var&gt;&lt;samp&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/log/trace.log&lt;/span&gt;&lt;/span&gt;&lt;/samp&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-size: small;"&gt;Restart is needed if the  trace level is set as configuration level.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;  &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Web Services&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.ws.webservices.trace.MessageTrace=all&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;JSF&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.ws.wim.registry=all: &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.ws.jsf=all: &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.ws.webcontainer.*=all: &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: black;"&gt;com.ibm.ws.jsp=all&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;PUMA&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Arial,sans-serif; font-size: small;"&gt;com.ibm.wps.puma.*=all:&lt;/span&gt; &lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.services.puma.*=all:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.command.puma.*=all:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.um.*=all:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.ws.wim.*=all:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.websphere.wim.*=all:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: black;"&gt;com.ibm.wsspi.wim.*=all&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;span style="color: black;"&gt;Personalization&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: black;"&gt;For issues with personalization in WebSphere Portal ( rules, campaigns, application objects ):&lt;br /&gt;com.ibm.websphere.personalization.*=all:com.ibm.websphere.query.*=all&lt;br /&gt;&lt;br /&gt;For issues with personalization and security:&lt;br /&gt;com.ibm.websphere.personalization.*=all&lt;br /&gt;&lt;br /&gt;For issues with personalization and Web Content Management (WCM):&lt;br /&gt;com.ibm.websphere.personalization.*=all:com.ibm.websphere.query.*=all:&lt;br /&gt;com.ibm.workplace.wcm.pzn.*=all:com.ibm.workplace.wcm.services.pzn.*=all&lt;br /&gt;&lt;br /&gt;For issues with personalization and JCR:&lt;br /&gt;com.ibm.websphere.personalization.*=all:com.ibm.websphere.query.*=all:&lt;br /&gt;com.ibm.icm.jcr.*=all&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;For issues with personalization authoring performance:&lt;br /&gt;com.ibm.websphere.personalization.*=all:com.ibm.wps.caf.*=all&lt;br /&gt;&lt;br /&gt;For issues with personalization runtime performance:&lt;br /&gt;com.ibm.websphere.personalization.*=all&lt;br /&gt;&lt;br /&gt;For issues with personalization publishing:&lt;br /&gt;com.ibm.websphere.personalization.*=all&lt;br /&gt;&lt;br /&gt;For configuration issues with personalization authoring environment&lt;br /&gt;(Navigator Portlet, Editor Portlet, and List Portlet):&lt;br /&gt;com.ibm.websphere.personalization.*=all:com.ibm.wps.caf.*=all&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Portlet Container&lt;/b&gt; &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.pe.pc.*=all:   &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;org.apache.jetspeed.portlet.Portlet=all  &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;javax.portlet.Portlet=all&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Portlet Environment&lt;/b&gt; &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.pe.ext.*=all:   &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.pe.factory.*=all:   &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.pe.om.*=all:   &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.pe.util.*=all&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt; &lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Portlets&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;  &lt;/span&gt;&lt;span style="font-size: small;"&gt;Use to diagnose problems with portlets.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;   &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;com.ibm.wps.portlets.*=all:   &lt;/span&gt; &lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;span style="font-size: small;"&gt;org.apache.jetspeed.portlet.PortletLog=all&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif; font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/index.jsp?topic=/com.ibm.wp.ent.doc/wpf/run_logs.html"&gt;&lt;span style="font-style: normal;"&gt;http://publib.boulder.ibm.com/infocenter/wpdoc/v6r0/index.jsp?topic=/com.ibm.wp.ent.doc/wpf/run_logs.html&lt;/span&gt;&lt;/a&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-4613772675860498802?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/4613772675860498802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=4613772675860498802&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4613772675860498802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4613772675860498802'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/enabling-traces-in-websphere.html' title='Enabling traces in WebSphere Application Server'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-3971013598800865343</id><published>2011-12-08T12:05:00.000-08:00</published><updated>2011-12-08T12:05:23.074-08:00</updated><title type='text'>MongoDB</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;style type="text/css"&gt; &lt;!--  @page { margin: 0.79in }  P { margin-bottom: 0.08in }  H2 { margin-bottom: 0.08in }  A:link { so-language: zxx } --&gt; &lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;MongoDB, noSQL open source database, written in C++, with many great features like map-reduce , auto sharding, replication, high availability and etc.&lt;/span&gt;&lt;/div&gt;&lt;h2&gt;&lt;span style="font-size: small;"&gt;Why MongoDB?&lt;/span&gt;&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Document-oriented&lt;/b&gt;   &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Documents (objects) map nicely to   programming language data types    &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Embedded documents and arrays   reduce need for joins    &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Dynamically-typed (schemaless)   for easy schema evolution    &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;No joins and no multi-document   transactions for high performance and easy scalability    &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;High performance&lt;/b&gt;   &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;No joins and embedding makes   reads and writes fast    &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Indexes including indexing of   keys from embedded documents and arrays    &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Optional streaming writes (no   acknowledgements)    &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;High availability&lt;/b&gt;   &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Replicated servers with automatic   master failover    &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Easy scalability&lt;/b&gt;   &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Automatic sharding   (auto-partitioning of data across servers)    &lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Reads and writes are distributed    over shards     &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;No joins or multi-document    transactions make distributed queries easy and fast     &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Eventually-consistent reads can   be distributed over replicated servers    &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Rich query language&lt;/b&gt;   &lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-3971013598800865343?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/3971013598800865343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=3971013598800865343&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3971013598800865343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3971013598800865343'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb.html' title='MongoDB'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-5871509183400022958</id><published>2011-12-08T12:02:00.000-08:00</published><updated>2011-12-08T12:02:55.156-08:00</updated><title type='text'>MongoDB : CRUD operation Java Code</title><content type='html'>&lt;div dir="ltr" style="font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: #7f0055;"&gt;&lt;b&gt;Prerequisite:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: #7f0055;"&gt;&lt;b&gt;1. Start the MongoDB before running the code.&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: #7f0055;"&gt;&lt;b&gt;package&lt;/b&gt;&lt;/span&gt;&lt;span style="color: black;"&gt; mongoDB;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;span style="color: black;"&gt;import java.net.UnknownHostException;&lt;br /&gt;import com.mongodb.BasicDBObject;&lt;br /&gt;import com.mongodb.DB;&lt;br /&gt;import com.mongodb.DBCollection;&lt;br /&gt;import com.mongodb.DBCursor;&lt;br /&gt;import com.mongodb.Mongo;&lt;br /&gt;import com.mongodb.MongoException;&lt;br /&gt;&lt;br /&gt;public class MongoDBTest {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void testMongoDB(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // DB Connection&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Mongo mongo = new Mongo("localhost", 27017);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Connect to existing db or if not exist create new one&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DB db= mongo.getDB("testmongodb");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Create a new collection or if not exist create a new one&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DBCollection dbCollection = db.getCollection("item");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Set data in the DBObject&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BasicDBObject item = new BasicDBObject();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; item.put("name", "Item1");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; item.put("quantity", "1.0");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // insert the data : if item already exist it will be ignore other wise added&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dbCollection.insert(item);&lt;br /&gt;&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; BasicDBObject find = new BasicDBObject();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; find.put("name", "Item1");&lt;br /&gt;&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; // find the record on the basis of search criteria&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DBCursor dbCursor = dbCollection.find();&lt;br /&gt;&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; while (dbCursor.hasNext()) {&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; System.out.println(dbCursor.next());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //Update the record&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; item = new BasicDBObject();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; item.put("name", "Item1 updated");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; item.put("quantity", "2.0");&lt;br /&gt;&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; // save the data : if item already exist it will be update otherwise added&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dbCollection.save(item);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; find = new BasicDBObject();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; find.put("name", "Item1 updated");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; find.put("name", "Item1");&lt;br /&gt;&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; // find the record on the basis of search criteria&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dbCursor = dbCollection.find();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; while (dbCursor.hasNext()) {&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; System.out.println(dbCursor.next());&lt;br /&gt;&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; } catch (UnknownHostException e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (MongoException e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static void main(String[] args){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; MongoDBTest db = new MongoDBTest();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; db.testMongoDB();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;{ "_id" : { "$oid" : "4eb1886a6858c8ac05afca8d"} , "name" : "Item1" , "quantity" : "1.2"}&lt;br /&gt;&lt;br /&gt;{ "_id" : { "$oid" : "4eb18ded6858419dd21690cd"} , "name" : "Item1" , "quantity" : "1.0"}&lt;br /&gt;&lt;br /&gt;{ "_id" : { "$oid" : "4eb1886a6858c8ac05afca8d"} , "name" : "Item1" , "quantity" : "1.2"}&lt;br /&gt;&lt;br /&gt;{ "_id" : { "$oid" : "4eb18ded6858419dd21690cd"} , "name" : "Item1" , "quantity" : "1.0"}&lt;br /&gt;&lt;br /&gt;{ "_id" : { "$oid" : "4eb18ded6858419dd21690ce"} , "name" : "Item1 updated" , "quantity" : "2.0"}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-5871509183400022958?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/5871509183400022958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=5871509183400022958&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5871509183400022958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5871509183400022958'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-crud-operation-java-code.html' title='MongoDB : CRUD operation Java Code'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-8814047214441814412</id><published>2011-12-08T11:56:00.001-08:00</published><updated>2011-12-08T11:56:48.148-08:00</updated><title type='text'>MongoDB: Insert a Document</title><content type='html'>&lt;div dir="ltr" style="font-family: inherit; text-align: left;" trbidi="on"&gt;&lt;span style="color: black; font-size: small;"&gt;T&lt;/span&gt;&lt;span style="color: black; font-size: small;"&gt;here are 4 ways to insert a document in the MongoDB&lt;/span&gt; &lt;br /&gt;&lt;h5 align="LEFT" style="font-weight: normal;"&gt;&lt;span style="color: black; font-size: small;"&gt;BasicDBObject&lt;/span&gt;&lt;/h5&gt;&lt;h5 align="LEFT" style="font-weight: normal;"&gt;&lt;span style="color: black; font-size: small;"&gt;BasicDBObjectBuilder&lt;/span&gt;&lt;/h5&gt;&lt;h5 align="LEFT" style="font-weight: normal;"&gt;&lt;span style="color: black; font-size: small;"&gt;Map&lt;/span&gt;&lt;/h5&gt;&lt;h5 align="LEFT" style="font-weight: normal;"&gt;&lt;span style="color: black; font-size: small;"&gt;Json&amp;nbsp;&lt;/span&gt; &lt;/h5&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-8814047214441814412?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/8814047214441814412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=8814047214441814412&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8814047214441814412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8814047214441814412'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-insert-document.html' title='MongoDB: Insert a Document'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-2256792018500414714</id><published>2011-12-08T11:56:00.000-08:00</published><updated>2011-12-08T11:56:25.807-08:00</updated><title type='text'>MongoDB: BasicDBObjectBuilder</title><content type='html'>&lt;span style="font-size: small;"&gt;&lt;span style="font-family: inherit;"&gt;public void testMongoDBObjecyBuilder() {&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // DB Connection&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Mongo mongo = new Mongo("localhost", 27017);&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DB db = mongo.getDB("testmongodb");&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DBCollection collection = db.getCollection("consumer");&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BasicDBObjectBuilder dbObj = BasicDBObjectBuilder.start()&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .add("database", "testmongodb")&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .add("table", "consumer");&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Set data in the DBObject&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BasicDBObjectBuilder consumer = BasicDBObjectBuilder.start()&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .add("name", "BasicDBObjectBuilder")&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; .add("age", "20");&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dbObj.add("details", consumer);&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; collection.insert(dbObj.get());&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (UnknownHostException e) {&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (MongoException e) {&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="font-family: inherit;" /&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-2256792018500414714?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/2256792018500414714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=2256792018500414714&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/2256792018500414714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/2256792018500414714'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-basicdbobjectbuilder.html' title='MongoDB: BasicDBObjectBuilder'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-7156626366400594406</id><published>2011-12-08T11:55:00.000-08:00</published><updated>2011-12-08T11:55:18.865-08:00</updated><title type='text'>MongoDB: BasicDBObject</title><content type='html'>public void testMongoDBObject() {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // DB Connection&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Mongo mongo = new Mongo("localhost", 27017);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DB db = mongo.getDB("testmongodb");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DBCollection collection = db.getCollection("consumer");&lt;br /&gt;&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; &amp;nbsp;&amp;nbsp;&amp;nbsp; BasicDBObject dbObj = new BasicDBObject();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dbObj.put("database", "testmongodb");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dbObj.put("table", "consumer");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Set data in the DBObject&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; BasicDBObject consumer = new BasicDBObject();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; consumer.put("name", "BasicDBObject");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; consumer.put("age", "20");&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dbObj.put("details", consumer);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; collection.insert(dbObj);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (UnknownHostException e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (MongoException e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-7156626366400594406?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/7156626366400594406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=7156626366400594406&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/7156626366400594406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/7156626366400594406'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-basicdbobject.html' title='MongoDB: BasicDBObject'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-3833958849787900588</id><published>2011-12-08T11:51:00.001-08:00</published><updated>2011-12-08T11:51:50.493-08:00</updated><title type='text'>MongoDB: Code Change If running in Secure Mode</title><content type='html'>&lt;div dir="ltr" style="font-family: inherit; text-align: left;" trbidi="on"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Mongo mongo = new Mongo("localhost", 27017); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; // Connect to existing db or if not exist create new one&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DB db= mongo.getDB("testmongodb");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; // Authenticate the user&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean isAuth = db.authenticate("admin", "admin".toCharArray()); &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-3833958849787900588?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/3833958849787900588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=3833958849787900588&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3833958849787900588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3833958849787900588'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-code-change-if-running-in.html' title='MongoDB: Code Change If running in Secure Mode'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-5460315784474087747</id><published>2011-12-08T11:51:00.000-08:00</published><updated>2011-12-08T11:51:10.175-08:00</updated><title type='text'>MongoDB: Secure Mode</title><content type='html'>&lt;div dir="ltr" style="font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; text-align: left;" trbidi="on"&gt;&lt;span style="color: black; font-size: small;"&gt;Start the server in normal mode&lt;/span&gt; &lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;nbsp;&amp;nbsp; /etc/init.d/mongod start&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;gt; use adduser&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;nbsp;&amp;nbsp; switched to db adduser&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;gt; db.addUser("admin","admn")&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;nbsp; { "n" : 0, "connectionId" : 1, "err" : null, "ok" : 1 }&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;nbsp; {&amp;nbsp; "user" : "admin", "readOnly" : false, "pwd" : "8ac----pwd---", "_id" : ObjectId("4eb-----") }&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;Stop the server&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;nbsp;&amp;nbsp; /etc/init.d/mongod stop&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;Start the server in the auth mode&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;nbsp;&amp;nbsp; /etc/init.d/mongod start –-auth&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-5460315784474087747?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/5460315784474087747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=5460315784474087747&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5460315784474087747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5460315784474087747'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-secure-mode.html' title='MongoDB: Secure Mode'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-5802759393130050171</id><published>2011-12-08T11:48:00.000-08:00</published><updated>2011-12-08T11:48:48.703-08:00</updated><title type='text'>MongoDB: Map</title><content type='html'>&lt;div dir="ltr" style="font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; text-align: left;" trbidi="on"&gt;&lt;span style="color: black; font-size: small;"&gt;public void testMongoDBInsertMap(){&lt;/span&gt; &lt;br /&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; // DB Connection&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; Mongo mongo = new Mongo("localhost", 27017);&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; DB db = mongo.getDB("testmongodb");&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; DBCollection collection = db.getCollection("consumer");&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; Map&lt;string, object=""&gt; map = new HashMap&lt;string, object=""&gt;();&lt;/string,&gt;&lt;/string,&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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;&amp;nbsp;&amp;nbsp; map.put("database", "testmongodb");&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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;&amp;nbsp;&amp;nbsp; map.put("table", "consumer");&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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;&amp;nbsp; // Set data in the DBObject&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&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; Map&lt;string, string=""&gt; mapData = new HashMap&lt;string, string=""&gt;();&lt;/string,&gt;&lt;/string,&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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;&amp;nbsp; mapData.put("name", "Map");&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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;&amp;nbsp; mapData.put("age", "20");&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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;&amp;nbsp; map.put("details", mapData);&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; collection.insert(new BasicDBObject(map));&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (UnknownHostException e) {&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; e.printStackTrace(); &lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (MongoException e) {&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&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; e.printStackTrace();&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;span style="color: black; font-size: small;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-5802759393130050171?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/5802759393130050171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=5802759393130050171&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5802759393130050171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5802759393130050171'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-map.html' title='MongoDB: Map'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6794723591230949234</id><published>2011-12-08T11:46:00.000-08:00</published><updated>2011-12-08T11:46:23.202-08:00</updated><title type='text'>MongoDB: Json</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;public void testMongoDBObjecyJSON(){ &lt;br /&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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; // DB Connection&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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; Mongo mongo = new Mongo("localhost", 27017);&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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; DB db = mongo.getDB("testmongodb");&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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; DBCollection collection = db.getCollection("consumer");&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&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;&amp;nbsp;&amp;nbsp; String json = "{'database' : 'localhost','table' : 'consumer'," +&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "'detail' : {'name' : 'json', 'age' : '40'}}";&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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; DBObject obj = (DBObject) JSON.parse(json);&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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; collection.insert(obj);   &lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (UnknownHostException e) {&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (MongoException e) {&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&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;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp; }&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6794723591230949234?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6794723591230949234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6794723591230949234&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6794723591230949234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6794723591230949234'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-json.html' title='MongoDB: Json'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-4839314500150251475</id><published>2011-12-08T11:44:00.000-08:00</published><updated>2011-12-08T11:44:27.432-08:00</updated><title type='text'>MongoDB: Complete Java Example</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;package mongoDB; &lt;br /&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import java.net.UnknownHostException;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import java.util.HashMap;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import java.util.Map;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.BasicDBObject;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.BasicDBObjectBuilder;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.DB;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.DBCollection;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.DBCursor;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.DBObject;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.Mongo;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.MongoException;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;import com.mongodb.util.JSON;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;public class MongoDBInsertDB {&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void testMongoDBfindRecord(){&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp; // DB Connection&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp; Mongo mongo = new Mongo("localhost", 27017);&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp; DB db = mongo.getDB("testmongodb");&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp; DBCollection collection = db.getCollection("consumer");&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp; BasicDBObject find = new BasicDBObject();&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp; find.put("database", "testmongodb");&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; // find the record on the basis of search criteria&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp; DBCursor dbCursor = collection.find(find);&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("Search results :  ");&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp;&amp;nbsp; while (dbCursor.hasNext()) {&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(dbCursor.next());&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (UnknownHostException e) {&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (MongoException e) {&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;/div&gt;&lt;div style="font-weight: normal; text-align: left;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; public static void main(String[] args){&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MongoDBInsertDB db = new MongoDBInsertDB();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("------ DBObject ------");&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.testMongoDBObject();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("------ DBObjectMap ------");&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.testMongoDBInsertMap();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("------ DBObjectBuilder ------");&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.testMongoDBObjecyBuilder();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("------ JSON ------");&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.testMongoDBObjecyJSON();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println("------ Find Record ------");&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; db.testMongoDBfindRecord();&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;&amp;nbsp;&amp;nbsp; }&lt;/div&gt;&lt;div align="LEFT" style="font-weight: normal;"&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-4839314500150251475?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/4839314500150251475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=4839314500150251475&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4839314500150251475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4839314500150251475'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-complete-java-example.html' title='MongoDB: Complete Java Example'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6934730648249865570</id><published>2011-12-08T11:39:00.000-08:00</published><updated>2011-12-08T11:39:04.652-08:00</updated><title type='text'>JSF-Ajax Portlet</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Web applications are now commonly referred to as Web 1.0. They have two distinct weak points from the user experience point of view: &lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;The interaction between the  browser and the server is initiated by a limited number of controls  on the page -- usually only by links and buttons.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;The interaction between the  browser and the server results in updating the entire browser  window.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Web 2.0, works around these weak points by using Ajax technology. In Ajax, interactions between the browser and the server occur in the background. They are also more targeted than the usual browser-server interactions, in that only a subset of the page can be sent to the server, and the server can return only a subset of the page to be updated. As a result of this approach, communication between the browser and server can be initiated by almost any event. This results in significant benefits:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Communication is faster, because  less data is transmitted.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;The user stays on the same page,  because less navigation from page to page is required.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Complete browser is not refreshed.  because only small regions of the page get updated with each Ajax  request.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;How to use Ajax with JSF components&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;There are 4 steps to integrate Ajax with JSF:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Identify the area of the page that  will be updated by the Ajax request. &lt;br /&gt;(If using  Rational  Application Developer v7x, you can use Ajax with the content of  almost any panel component. The panels range from simple containers,  such as &lt;h:panelgroup&gt; and &lt;h:panelgrid&gt;, to  feature-rich panels, such as menus (&lt;hx:panelmenu&gt;) and  dialogs (&lt;hx:paneldialog&gt;).&lt;/hx:paneldialog&gt;&lt;/hx:panelmenu&gt;&lt;/h:panelgrid&gt;&lt;/h:panelgroup&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the type of Ajax request to  use. There are three different kinds of Ajax requests supported in  the RAD V7 JSF library:&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;GET request for the same page (&lt;hx:ajaxrefreshrequest&gt;)&lt;/hx:ajaxrefreshrequest&gt;&lt;/li&gt;&lt;li&gt;POST request for the same page (&lt;hx:ajaxsubmitrequest&gt;)&lt;/hx:ajaxsubmitrequest&gt;&lt;/li&gt;&lt;li&gt;GET request for another page (&lt;hx:ajaxexternalrequest&gt;)&lt;/hx:ajaxexternalrequest&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol start="3"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Configure parameters to pass to  the server with the Ajax request.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;For GET requests, you can pass values of various input fields on the page.&lt;/li&gt;&lt;li&gt;For POST request, the entire form is submitted.&lt;/li&gt;&lt;/ul&gt;&lt;ol start="4"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Identify the event that initiates  the Ajax request. This can be any client-side JavaScript event, such  as onclick for a button, onblur for an input field, or onchange for  a check box.   &lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;u&gt;&lt;b&gt;Steps to create the Project:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Create a Portlet Project. &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select PortletType: Faces Portlet&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Add jsp in the WebContent.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Go to the design Mode&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Add the following components on  the page using Enhanced Faces Components drawer&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Drag the input component.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Drag a Panel Group box component   from the palette onto the page below the Input component. When you   are prompted for the group box type, select Group.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Drag an Output component from   the palette onto the Panel Group box.&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Add Ajax support to the panel&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the outputText component   and switch to the Properties view.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;In the Properties view, select   the h:panelGroup tag, which is directly above the h:outputText tag   in the left-side tag navigator.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the Ajax page for the   h:panelGroup tag.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Click the Allow Ajax updates   check box.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select Refresh as the Ajax   request type.&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Configure parameters for the Ajax  request   &lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select Click to edit Ajax request   properties on the Ajax properties page.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;On the Properties page for the   hx:ajaxRefreshRequest tag:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Click Add Parameter for the    parameters to send from the browser.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the name of the Input    component (in this case, text1) from the combo box.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;On the Properties page , Select   the outputText component.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Enter Hello, #{param.text1} into   the Value field.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="8"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Initiate the Ajax request.&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the inputText component.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Switch to Quick Edit view.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;In the Quick Edit view:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the onblur event in the    list of events on the left side.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Click the Use predefined    behavior check box.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the Invoke Ajax behavior    on the specified tag action.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Select the name of the    panelGroup (in this case, group1) as the target.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;JSP source will look like this:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;h:form id="form1" styleclass="form"&gt;&lt;/h:form&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;h:inputtext id="text1" styleclass="inputText"&gt;&lt;/h:inputtext&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;hx:behavior behavioraction="get" event="onblur" id="behavior1"&gt;&lt;/hx:behavior&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;h:inputtext id="text11" styleclass="inputText"&gt;&lt;/h:inputtext&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;h:panelgroup id="group1" styleclass="panelGroup"&gt;&lt;/h:panelgroup&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;h:outputtext id="text2" styleclass="outputText" value="Hello#{param.text1}"&gt;&lt;/h:outputtext&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;hx:ajaxrefreshrequest id="ajaxRefreshRequest1" params="text1" target="group1"&gt;&lt;/hx:ajaxrefreshrequest&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://3.bp.blogspot.com/-KKlzdpLyKnc/TuAACRqzg0I/AAAAAAAAADo/iI7l9x4InsE/s1600/2011-12-07_16-06-54.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="130" src="http://3.bp.blogspot.com/-KKlzdpLyKnc/TuAACRqzg0I/AAAAAAAAADo/iI7l9x4InsE/s320/2011-12-07_16-06-54.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span id="goog_1011154452"&gt;&lt;/span&gt;&lt;span id="goog_1011154453"&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol start="9"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Go to the jsp source and add the  targetAction to the behavior tag : targetAction="group1"&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;The value of targetAction is same as the target value in the &lt;hx:ajaxrefreshrequest&gt; tag.&lt;/hx:ajaxrefreshrequest&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6934730648249865570?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6934730648249865570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6934730648249865570&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6934730648249865570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6934730648249865570'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/jsf-ajax-portlet.html' title='JSF-Ajax Portlet'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-KKlzdpLyKnc/TuAACRqzg0I/AAAAAAAAADo/iI7l9x4InsE/s72-c/2011-12-07_16-06-54.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-8085532038168858279</id><published>2011-12-08T11:32:00.001-08:00</published><updated>2011-12-08T11:32:39.499-08:00</updated><title type='text'>MongoDB : Maven dependency</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-size: small;"&gt;Add the following entry in the pom.xml&lt;/span&gt; &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="color: teal;"&gt;          &lt;/span&gt;&lt;span style="font-family: Monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: teal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f;"&gt;dependency&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp;   &lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f;"&gt;groupId&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;u&gt;org&lt;/u&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;.&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;u&gt;mongodb&lt;/u&gt;&lt;/span&gt;&lt;span style="color: teal;"&gt;&lt;span style="color: #3f7f7f;"&gt;groupId&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Monospace;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Monospace;"&gt;&lt;span style="font-family: Monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp;   &lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f;"&gt;artifactId&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;u&gt;mongo&lt;/u&gt;&lt;/span&gt;&lt;span style="color: black;"&gt;-java-driver&lt;/span&gt;&lt;span style="color: teal;"&gt;&lt;span style="color: #3f7f7f;"&gt;artifactId&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Monospace;"&gt;&lt;span style="font-family: Monospace;"&gt; &lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: black;"&gt;&amp;nbsp;   &lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #3f7f7f;"&gt;version&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: black;"&gt;2.5.2&lt;/span&gt;&lt;span style="color: teal;"&gt;&lt;span style="color: #3f7f7f;"&gt;version&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Monospace;"&gt; &lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;span style="font-family: Monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: black;"&gt;  &lt;/span&gt;&lt;span style="color: teal;"&gt;&lt;span style="color: #3f7f7f;"&gt;dependency&lt;/span&gt;&lt;span style="color: teal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-family: Monospace;"&gt; &lt;div align="LEFT" style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-8085532038168858279?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/8085532038168858279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=8085532038168858279&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8085532038168858279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8085532038168858279'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-maven-dependency.html' title='MongoDB : Maven dependency'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-3538960066706807910</id><published>2011-12-08T11:32:00.000-08:00</published><updated>2011-12-08T11:32:00.534-08:00</updated><title type='text'>MongoDB: Installation</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-size: small;"&gt;Install Mongo DB on Linux&lt;/span&gt; &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;1. Install MongoDB on Fedora 16/15/14/13/12/11, CentOS 6/5.6 and Red Hat (RHEL) 6/5.6&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Change to root User&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;sudo -i&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Add and enable 10gen  MongoDB repository&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; open /etc/yum.repos.d/10gen-mongodb.repo&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;[10gen]&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;name=10gen Repository&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;gpgcheck=0&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Install mongo server  and mongo client packages&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; yum install mongo-10gen mongo-10gen-server&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.48in; text-indent: -0.23in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.48in; text-align: left; text-indent: -0.23in;"&gt;&lt;span style="font-size: small;"&gt;2. Configure MongoDB Database Server&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Edit /etc/mongod.conf&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;nano -w  /etc/mongod.conf&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Check and set basic  settings, before starting MongoDB (default settings are good)&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;logpath=/var/log/mongo/mongod.log&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;port=27017&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;dbpath=/var/lib/mongo&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.44in; text-indent: -0.16in;"&gt;&lt;span style="font-size: small;"&gt;3. Start MongoDB Server&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;/etc/init.d/mongod start&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.26in;"&gt;&lt;span style="font-size: small;"&gt;4. Test MongoDB Server&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;Open MongoDB Command Line Client&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; margin-left: 0.49in;"&gt;&lt;span style="font-size: small;"&gt;mongo&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;ol start="5"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;Open Browser&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://localhost:28017/"&gt;http://localhost:28017/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-3538960066706807910?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/3538960066706807910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=3538960066706807910&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3538960066706807910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3538960066706807910'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/mongodb-installation.html' title='MongoDB: Installation'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-545096996052403423</id><published>2011-12-07T15:37:00.000-08:00</published><updated>2011-12-07T15:37:19.067-08:00</updated><title type='text'>WMM &amp; VMM</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-weight: bold;"&gt;WMM &lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;security.xml&lt;/span&gt; : (wps_profile/config/cells/cell01)&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;wimconfig.xml: &lt;/span&gt; (wps_profile/config/cells/cell01/wim/config)&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;i&gt;&lt;b&gt;wimconfig.xml&lt;/b&gt;&lt;/i&gt;  is a WebSphere Application Server (WSAS) configuration file, however it  is an important file in a WebSphere Portal environment.It is the main  file that controls the behavior of the Virtual Member Manager component  (VMM). WebSphere Portal (WP or Portal) depends on VMM services during  login, user and group search and access control assignments, among other  tasks. Wimconfig.xml is critical to the functioning of WebSphere  Portal.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;&lt;i&gt;&lt;b&gt;VMM&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In Portal 6.1 and later VMM has replaced the WebSphere  Member Manager (WMM). There is no WMM code in Portal or WSAS 6.1. Most  of the terms used in WMM (realm, searchBase) translate directly to VMM  and the configuration "pattern" of properties and their values  represented as XML applies to VMM as well. VMM is simpler to manage in  that there is only a single major configuration file while in WMM care  often had to be taken to ensure consistency across multiple files.&lt;br /&gt;&lt;ol&gt;&lt;/ol&gt;The  core Portal code does not communicate with a configured repository  directly. Calls are made by VMM at the direction of Portal components;  principal among these is PUMA, the Portal User Management Architecture.  For example, a search for a user by CN in the Users and Groups portlet  makes calls to PUMA which in turn calls VMM to fetch data from the  repository. Similarly, PUMA API calls also result in method calls by  VMM.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-545096996052403423?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/545096996052403423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=545096996052403423&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/545096996052403423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/545096996052403423'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/wmm-vmm.html' title='WMM &amp; VMM'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-1915479904684480158</id><published>2011-12-07T15:33:00.000-08:00</published><updated>2011-12-07T15:33:37.596-08:00</updated><title type='text'>Websphere portal - Autologin</title><content type='html'>http://server:port/wps/portal/  cxml/04_SD9ePMtCP1I800I_KydQvyHFUBADPmuQy?&lt;br /&gt;userid=user  ID&amp;amp;password=password&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-1915479904684480158?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/1915479904684480158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=1915479904684480158&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1915479904684480158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1915479904684480158'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2011/12/websphere-portal-autologin.html' title='Websphere portal - Autologin'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6125621238209334054</id><published>2010-08-01T09:34:00.000-07:00</published><updated>2010-08-01T09:34:25.003-07:00</updated><title type='text'>Java - Capturing SOAP request/response for Apache Axis client</title><content type='html'>&lt;strong&gt;&lt;/strong&gt;Save this file as client-config.wsdd in the working directory  of your Axis client. Axis will load it automatically.&lt;br /&gt;&lt;br /&gt;The configuration here  tells Axis to save all incoming and outgoing XML into a file named axis.log.  &lt;br /&gt;&lt;br /&gt;//Save this file as "client-config.wsdd" in the working    directory of your Axis client. Axis will load it automatically.    The configuration here tells Axis to save all incoming and outgoing XML    into a file named "axis.log"&lt;br /&gt;&lt;br /&gt;&amp;lt;deployment&amp;nbsp;    xmlns="http://xml.apache.org/axis/wsdd/"    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"&amp;gt;&lt;br /&gt;&amp;lt;handler    name="log"    type="java:org.apache.axis.handlers.LogHandler"/&amp;gt;&lt;br /&gt;&amp;lt;globalConfiguration&amp;gt;&lt;br /&gt;&amp;lt;requestFlow&amp;gt;&amp;lt;handler    type="log"/&amp;gt;&amp;lt;/requestFlow&amp;gt;&amp;nbsp;&amp;lt;responseFlow&amp;gt;&amp;lt;handler    type="log"/&amp;gt;&amp;lt;/responseFlow&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/globalConfiguration&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;transport    name="http"    pivot="java:org.apache.axis.transport.http.HTTPSender"/&amp;gt;&lt;br /&gt;&amp;lt;/deployment&amp;gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6125621238209334054?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6125621238209334054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6125621238209334054&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6125621238209334054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6125621238209334054'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2010/08/java-capturing-soap-requestresponse-for.html' title='Java - Capturing SOAP request/response for Apache Axis client'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-3998802423830915039</id><published>2010-02-27T00:08:00.000-08:00</published><updated>2010-02-27T13:15:50.060-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wimxmlextension.xml'/><category scheme='http://www.blogger.com/atom/ns#' term='wkplc.properties'/><category scheme='http://www.blogger.com/atom/ns#' term='WPS Custom Attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='Custom Attributes in Websphere Portal'/><title type='text'>Adding Custom Attributes to WebSphere Portal</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;Before adding any new attribute, the current attribute configuration should be validated and corrected with proper mappings and removing unwanted attributes.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;Validate/Verify the Attribute Mapping&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;br /&gt;Run ConfigEngine.bat wp-validate-standalone-ldap-attribute-config -DWasPassword=password&lt;br /&gt;&lt;br /&gt;There are 2 ways to add the attribute&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;In wkplc.properties&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;br /&gt;Modify the wkplc.properties with the following:&lt;br /&gt;standalone.ldap.attributes.mapping.ldapName=mail&lt;br /&gt;standalone.ldap.attributes.mapping.portalName=ibm-primaryEmail&lt;br /&gt;standalone.ldap.attributes.mapping.entityTypes=PersonAccount,Group&lt;br /&gt;&lt;br /&gt;The above configuration also maps the ibm-primaryEmail to mail in LDAP.&lt;br /&gt;&lt;br /&gt;Run&lt;br /&gt;&lt;br /&gt;ConfigEngine.bat wp-update-standalone-ldap-attribute-config -DWasPassword=password&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;Command line&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;br /&gt;Check if wimejb.jar is installed for not. If not then install it using&lt;br /&gt;&lt;br /&gt;1. ConfigEngine.bat &lt;span style="font-weight: bold;"&gt;wp-la-install-ear&lt;/span&gt; -DwasPassword=password&lt;br /&gt;   (Execute ./ConfigEngine.sh wp-la-install-ear task, this task will install WIMSYSTEM.ear which contains wimejb.jar  on your portal server. The wimejb.jar is used for actual attribute addition)&lt;br /&gt;&lt;br /&gt;2. Restart all the servers.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Add Attribute&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;./ConfigEngine.sh &lt;span style="font-weight: bold;"&gt;wp-add-property&lt;/span&gt; -DWasPassword=password     -Dla.propertyName="portal property name"&lt;br /&gt;-Dla.entityTypes=PersonAccount&lt;br /&gt;-Dla.dataType=String&lt;br /&gt;-Dla.multiValued=false&lt;br /&gt;-Dla.providerURL=corbaloc:iiop:host-name:bootstrap-port&lt;br /&gt;&lt;br /&gt;Restart the server&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-3998802423830915039?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/3998802423830915039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=3998802423830915039&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3998802423830915039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/3998802423830915039'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2010/02/adding-custom-attributes-to-websphere.html' title='Adding Custom Attributes to WebSphere Portal'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6808697606689407427</id><published>2010-02-27T00:03:00.000-08:00</published><updated>2010-02-27T13:12:52.942-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Host name change in Websphere Portal'/><category scheme='http://www.blogger.com/atom/ns#' term='LDAP Host name'/><title type='text'>Change LDAP Host Name in Websphere Portal</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;&lt;span style="font-family:arial;"&gt;Change the host name for LDAP in the following files:&lt;/span&gt; &lt;/span&gt;&lt;ul style="color: rgb(0, 0, 0);"&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;&lt;span style="font-family:arial;"&gt;security.xml (wps_profile/config/cells/cell01)&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;wimconfig.xml (wps_profile/config/cells/cell01/wim/config)&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;wkplc.properties (wps_profile/ConfiEngine/properties)&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt; &lt;span style="font-family:arial;"&gt;Restart the server.&lt;/span&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6808697606689407427?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6808697606689407427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6808697606689407427&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6808697606689407427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6808697606689407427'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2010/02/change-ldap-host-name-in-websphere.html' title='Change LDAP Host Name in Websphere Portal'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-939263437269487882</id><published>2010-02-27T00:00:00.000-08:00</published><updated>2010-02-27T13:12:20.396-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Upgrade WPS to 6.1.5'/><category scheme='http://www.blogger.com/atom/ns#' term='Websphere Portal fix pact 6.1.5'/><title type='text'>Update Portal from 6.1.2 to 6.1.5</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;Perform the following steps to download the fix and the WebSphere Portal Update Installer:&lt;br /&gt;&lt;br /&gt;1. Download the latest cumulative fix file and WebSphere Portal Update Installer from &lt;a href="http://www.ibm.com/support/docview.wss?rs=688&amp;amp;uid=swg24025054"&gt;ibm site&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;br /&gt;2. Create the portal_server_root/update directory and extract the WebSphere Portal Update Installer file into this directory. NOTE on Windows: The pkunzip utility might not correctly decompress the download image so use another utility such as Winzip to unzip the image.&lt;br /&gt;&lt;br /&gt;3.Create the portal_server_root/update/fixpacks directory and extract the WP_PTF_6103.zip file into this directory.&lt;br /&gt;&lt;br /&gt;If using the Universal PUI, (which does not include the bundled Java environment), run the following command, setupCmdLine.bat for Windows or . ./setupCmdLine.sh for Unix/Linux from the was_profile_root/bin directory to set up the Java environment for the graphical user interface installation program.&lt;br /&gt;&lt;br /&gt;* Enter the following command to launch the graphical user interface installation program:&lt;br /&gt;        Windows: portal_server_root\update&gt; updatePortalWizard.bat&lt;br /&gt;        Unix/Linux: portal_server_root/update&gt; ./updatePortalWizard.sh&lt;br /&gt;&lt;br /&gt;Once the fix pack is successfully installed then install the fixpack of 6.1.5&lt;br /&gt;&lt;br /&gt;4. Change to the wp_profile_root/PortalServer/bin directory.&lt;br /&gt;&lt;br /&gt;5. Run the appropriate command for your operating system:&lt;br /&gt;Unix/Linux: ./install615.sh&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-939263437269487882?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/939263437269487882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=939263437269487882&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/939263437269487882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/939263437269487882'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2010/02/update-of-portal-from-612-to-615.html' title='Update Portal from 6.1.2 to 6.1.5'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-7887029843296544446</id><published>2010-02-26T23:26:00.000-08:00</published><updated>2010-02-27T13:06:43.786-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Websphere portal'/><category scheme='http://www.blogger.com/atom/ns#' term='WebApp Integrator'/><title type='text'>Web App Integrator</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;To integrate an external web application with Portal, there are 3 approaches:&lt;br /&gt;&lt;br /&gt;1. Write a set of portlets that expose the web application's UI/functionality.&lt;br /&gt;2. Use Portal's web clipper portlet (an iFrame based portlet).&lt;br /&gt;3. WebAppIntegrator offers a third approach allows external web applications to be integrated with WebSphere Portal (Portal)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;WebAppIntegrator solution work?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;WebAppIntegrator integration is achieved by "injecting" Portal navigation markup into the external web application when the web application is rendered.  The solution implementation leverages the existing Portal URL page feature and makes use of a new Portal entry point, the WebAppIntegrator theme template, which returns JavaScript that generates Portal page navigation markup (e.g. page tabs, the banner and bread crumbs).  This markup is "injected" into an external web application by adding an HTML.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; Advantages of using the WebAppIntegrator&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. No portlet development is required to implement this integration since it does not use portlets at runtime. Portal administrators, in concert with the internal web application owner, can do this integration.&lt;br /&gt;&lt;br /&gt;2.It does not use an iFrame.  Consequently, the viewing area of the web application is not constrained in any way (i.e. no iFrame scroll bars).  Also, all JavaScript and links within the integrated web application continue to function as expected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Integration?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;There are exactly three steps required to integrate an external web application with Portal:&lt;br /&gt;&lt;br /&gt;1.Create the URL which is pointing to the external web application on Portal.&lt;br /&gt;&lt;br /&gt;2.Download the WebAppIntegrator from the developer &lt;a href="http://www-01.ibm.com/software/brandcatalog/portal/lotus/details?catalog.label=1WP1001IA"&gt;site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;3.Follow the steps to install the WebAppIntegrator described in the downloaded  zip.&lt;br /&gt;&lt;br /&gt;4.Once the the WeIntegrator is configured.&lt;br /&gt;&lt;br /&gt;5.Installed the war file and add the portlet on the page.&lt;br /&gt;&lt;br /&gt;6.Use the new Web Application Integrator portlet to generate an HTML "script" tag using Unique name.&lt;br /&gt;&lt;br /&gt;7.Add the script tag to the web application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Design goals&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There were several design goals that guided this solution as its implementation evolved.  They should provide a technical audience with a better understanding of this solution's design.&lt;br /&gt;&lt;br /&gt;They are listed below in order of perceived importance:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;1. Ease of Integration - The integration is achieved in three simple steps, the most complex of which is simply adding an HTML "script" tag to the external web application.&lt;br /&gt;&lt;br /&gt;2. External web application can be implemented using non-J2EE technologies - Portal navigation markup is returned as JavaScript when the browser executes the HTML "script" tag. Because the tag's execution occurs on the client machine (in the browser), the integrated web application can be built using any technology (e.g. .NET, Ruby on Rails, PHP, PEARL, Domino, J2EE, etc.)&lt;br /&gt;&lt;br /&gt;3. Cross-Domain Capability - web applications need not be installed in the same domain as Portal.&lt;br /&gt;&lt;br /&gt;4. Bookmarkability - Web applications can be bookmarked (not possible when web application is integrated with Portal using iFrame approach). When SSO in configured between the web application and Portal, bookmarked pages of the web application will properly display Portal navigation markup.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;script&gt; tag to the web application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Advantages of using the WebAppIntegrator&lt;br /&gt;&lt;br /&gt;   1. No portlet development is required to implement this integration since it does not use portlets at runtime. Portal administrators, in concert with the internal web application owner, can do this integration.&lt;br /&gt;2.It does not use an iFrame.  Consequently, the viewing area of the web application is not constrained in any way (i.e. no iFrame scroll bars).  Also, all JavaScript and links within the integrated web application continue to function as expected.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Integration?&lt;br /&gt;There are exactly three steps required to integrate an external web application with Portal:&lt;br /&gt;&lt;br /&gt;1.Create the URL which is pointing to the external web application on Portal.&lt;br /&gt;2.Download the WebAppIntegrator from the developer site. http://www-01.ibm.com/software/brandcatalog/portal/lotus/details?catalog.label=1WP1001IA&lt;br /&gt;3.Follow the steps to install the WebAppIntegrator described in the downloaded  zip. &lt;br /&gt;4.Once the the WeIntegrator is configured. &lt;br /&gt;5.Installed the war file and add the portlet on the page.&lt;br /&gt;6.Use the new Web Application Integrator portlet to generate an HTML &lt;script&gt; tag using Unique name. &lt;br /&gt;7.Add the script tag to the web application.&lt;br /&gt;&lt;br /&gt;Design goals&lt;br /&gt;&lt;br /&gt;There were several design goals that guided this solution as its implementation evolved.  They should provide a technical audience with a better understand of this solution's design.&lt;br /&gt;&lt;br /&gt;They are listed below in order of perceived importance:&lt;br /&gt;&lt;br /&gt;   1. Ease of Integration - The integration is achieved in three simple steps, the most complex of which is simply adding an HTML &lt;script&gt; tag to the external web application.&lt;br /&gt;   2. External web application can be implemented using non-J2EE technologies - Portal navigation markup is returned as JavaScript when the browser executes the HTML &lt;script&gt; tag.  Because the tag's execution occurs on the client machine (in the browser), the integrated web application can be built using any technology (e.g. .NET, Ruby on Rails, PHP, PEARL, Domino, J2EE, etc.)&lt;br /&gt;   3. Cross-Domain Capability - web applications need not be installed in the same domain as Portal.&lt;br /&gt;   4. Bookmarkability - Web applications can be bookmarked (not possible when web application is integrated with Portal using iFrame approach). When SSO in configured between the web application and Portal, bookmarked pages of the web application will properly display Portal navigation markup&lt;br /&gt;&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-7887029843296544446?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/7887029843296544446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=7887029843296544446&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/7887029843296544446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/7887029843296544446'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2010/02/web-app-integrator.html' title='Web App Integrator'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-1930110689926479632</id><published>2010-02-26T23:05:00.000-08:00</published><updated>2010-02-27T12:56:23.659-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Websphere portal'/><category scheme='http://www.blogger.com/atom/ns#' term='WPS and LDAP'/><category scheme='http://www.blogger.com/atom/ns#' term='Configure LDAP with websphere portal'/><title type='text'>WebSphere Portal Server : Standalone LDAP Registry</title><content type='html'>&lt;font style="font-family: arial; color: rgb(0, 0, 0);" size="2"&gt;Steps to configure Stand-alone LDAP registry for the WebSphere Portal Server.&lt;br /&gt;&lt;br /&gt;1. Go to &lt;websphere profile=""&gt;/ConfigEngine/properties&lt;br /&gt;2. Edit wkplc.properties&lt;br /&gt;&lt;br /&gt;    standalone.ldap.id=&lt;font style="font-style: italic;"&gt;unique_name&lt;/font&gt;&lt;uniquename&gt;&lt;br /&gt;         standalone.ldap.host=&lt;font style="font-style: italic;"&gt;host_name&lt;/font&gt;&lt;ldap server="" host=""&gt;&lt;br /&gt;         standalone.ldap.port=&lt;font style="font-style: italic;"&gt;389&lt;/font&gt;&lt;ldap server="" port=""&gt;&lt;br /&gt;         standalone.ldap.bindDN=&lt;font style="font-style: italic;"&gt;&lt;/font&gt;&lt;/ldap&gt;&lt;/ldap&gt;&lt;/uniquename&gt;&lt;/websphere&gt;&lt;/font&gt;&lt;font style="font-style: italic; font-family: arial; color: rgb(0, 0, 0);" size="2"&gt;uid=wpsbind,cn=users,dc=abc,dc=com&lt;/font&gt;&lt;font style="font-family: arial; color: rgb(0, 0, 0);" size="2"&gt;&lt;websphere profile=""&gt;&lt;uniquename&gt;&lt;ldap server="" host=""&gt;&lt;ldap server="" port=""&gt;&lt;font style="font-style: italic;"&gt;&gt;&lt;/font&gt;&lt;br /&gt;         standalone.ldap.bindPassword=&lt;password&gt;&lt;br /&gt;         standalone.ldap.ldapServerType=&lt;font style="font-style: italic;"&gt;SUNONE&lt;/font&gt;&lt;ldap server=""&gt;&lt;br /&gt;    standalone.ldap.userIdMap=&lt;font style="font-style: italic;"&gt;inetOrgPerson:uid&lt;/font&gt;&lt;br /&gt;    standalone.ldap.groupIdMap=&lt;font style="font-style: italic;"&gt;*:cn&lt;/font&gt;&lt;br /&gt;    standalone.ldap.groupMemberIdMap=&lt;br /&gt;    standalone.ldap.userFilter=((objectclass=inetOrgPerson))&lt;br /&gt;    standalone.ldap.groupFilter=((objectclass=groupOfUniqueNames))&lt;br /&gt;         standalone.ldap.serverId=&lt;id&gt;&lt;br /&gt;         standalone.ldap.serverPassword=&lt;password&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    # The security context of this server. A realm with this name will be created.&lt;br /&gt;    standalone.ldap.realm=&lt;realm_name&gt;&lt;br /&gt;&lt;br /&gt;    # The ID of the WAS admin user. The ID must exist in the LDAP server.&lt;br /&gt;  &lt;br /&gt;standalone.ldap.primaryAdminId=uid=wasadmin,cn=users,dc=abc,dc=com&lt;br /&gt;    standalone.ldap.primaryAdminPassword=wasadmin&lt;br /&gt;&lt;br /&gt;    # The ID of the portal admin user. The ID must exist in the LDAP server.&lt;br /&gt;  &lt;br /&gt;standalone.ldap.primaryPortalAdminId=uid=wasadmin,cn=users,dc=abc,dc=com&lt;br /&gt;    standalone.ldap.primaryPortalAdminPassword=wasadmin&lt;br /&gt;&lt;br /&gt;    # The user group with admin permission in portal. The group must exist in the LDAP server.&lt;br /&gt;  &lt;br /&gt;standalone.ldap.primaryPortalAdminGroup=cn=wpsadmins,cn=groups,dc=abc,dc=com&lt;br /&gt;&lt;br /&gt;    # The LDAP base entry.&lt;br /&gt;    # This is the startpoint for all LDAP searches of Websphere Application Server Security&lt;br /&gt;  &lt;br /&gt;standalone.ldap.baseDN=dc=abc,dc=com&lt;br /&gt;&lt;br /&gt;    # Entity type Group&lt;br /&gt;&lt;br /&gt;    standalone.ldap.et.group.objectClasses=groupOfUniqueNames&lt;br /&gt;standalone.ldap.et.group.objectClassesForCreate=&lt;br /&gt;&lt;br /&gt;    # The search base or bases to use while searching the entity type.&lt;br /&gt;    standalone.ldap.et.group.searchBases=&lt;br /&gt;&lt;br /&gt;    # Entity type PersonAccount&lt;br /&gt;&lt;br /&gt;    standalone.ldap.et.personaccount.searchFilter=&lt;br /&gt;    standalone.ldap.et.personaccount.objectClasses=inetOrgPerson&lt;br /&gt;standalone.ldap.et.personaccount.objectClassesForCreate=&lt;br /&gt;&lt;br /&gt;    # The search base or bases to use while searching the entity type.&lt;br /&gt;    standalone.ldap.et.personaccount.searchBases=&lt;br /&gt;## Group member attributes&lt;br /&gt;    standalone.ldap.gm.groupMemberName=uniqueMember&lt;br /&gt;standalone.ldap.gm.objectClass=groupOfUniqueNames&lt;br /&gt;standalone.ldap.gm.scope=direct&lt;br /&gt;standalone.ldap.gm.dummyMember=uid=dummy&lt;br /&gt;        &lt;br /&gt;                &lt;br /&gt;    # Default parent, RDN attribute&lt;br /&gt;  &lt;br /&gt;    standalone.ldap.personAccountParent=cn=users,dc=abc,dc=com&lt;br /&gt;    standalone.ldap.groupParent=cn=groups,dc=abc,dc=com&lt;br /&gt;standalone.ldap.personAccountRdnProperties=uid&lt;br /&gt;    standalone.ldap.groupRdnProperties=cn&lt;br /&gt;&lt;br /&gt;    # Defines if VMM will enable the ConnectionPool&lt;br /&gt;    standalone.ldap.connectionPool=false&lt;br /&gt;&lt;br /&gt;3. save the wkplc.propeties&lt;br /&gt;4. websphereProfile/ConfigEngine and run&lt;br /&gt;&lt;br /&gt;    ./ConfigEngine.sh validate-standalone-ldap -DWasPassword=wasadmin&lt;br /&gt;&lt;br /&gt;./ConfigEngine.sh wp-modify-ldap-security -DWasPassword=wasadmin&lt;br /&gt;&lt;br /&gt;Restart both the server1 and WebSphere_Portal server&lt;br /&gt;&lt;/realm_name&gt;&lt;/password&gt;&lt;/id&gt;&lt;/ldap&gt;&lt;/password&gt;&lt;/ldap&gt;&lt;/ldap&gt;&lt;/uniquename&gt;&lt;/websphere&gt;&lt;/font&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-1930110689926479632?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/1930110689926479632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=1930110689926479632&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1930110689926479632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1930110689926479632'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2010/02/websphere-portal-server-standalone-ldap.html' title='WebSphere Portal Server : Standalone LDAP Registry'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-1214638593172234186</id><published>2010-02-25T14:53:00.000-08:00</published><updated>2010-02-27T12:54:16.996-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ITAM'/><category scheme='http://www.blogger.com/atom/ns#' term='Webseal'/><category scheme='http://www.blogger.com/atom/ns#' term='Tivoli Access Manager'/><category scheme='http://www.blogger.com/atom/ns#' term='Webseal Login'/><category scheme='http://www.blogger.com/atom/ns#' term='EAI'/><category scheme='http://www.blogger.com/atom/ns#' term='TAM'/><title type='text'>ITAM - Webseal - Developing External Authentication Interface (EAI)</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;WebSEAL is a high-performance, multi-threaded Web server that applies fine-grained security policy to the Tivoli Access Manager protected Web object space. WebSEAL can provide single sign-on solutions and incorporate back-end Web application server resources into its security policy. WebSEAL normally acts as a reverse Web proxy by receiving HTTP/HTTPS requests from a Web browser and delivering content from its own Web server or from junctioned back-end Web application servers. Requests passing through WebSEAL are evaluated by the Tivoli Access Manager authorization service to determine whether the user is authorized to access the requested resource.&lt;/span&gt;&lt;br /&gt;&lt;a style="font-family: arial;" href="http://publib.boulder.ibm.com/tividd/td/ITAME/SC32-1359-00/en_US/HTML/am51_webseal_guide11.htm#i1038108%20"&gt;[Source: IBM Tivoli Access Manager &amp;amp; WebSEAL]&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Webseal provides a authentication interface out-of-box which does the authentication and authorization after user enters the username and password and submits the form.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;There can be scenarios/requirements where it is required to enhance the login page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;For example:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Branding of login page for an organization. Provide i18N.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Perform different actions before login to system.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Branding can be handled out-of-box if the login page is common to all SSO enabled applications. If the branding is required specific to each application, then it is difficult to address it OOB.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Similarly, for i18N it is not possible to maintain the resource bundles for the plain html form.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The above requirements can be fulfilled by designing an EAI and perform the desired operations and submit the control back to Webseal.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-weight: bold;"&gt;* Considering Struts framework for the module, following steps may be peformed to build the EAI module:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;1. Create an Action class which would be called by webseal to redirect the user to EAI.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;2. Map the action to login.jsp and display the desired page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;3. To meet the branding divide the page into different sections where the username/password box location need to be static while other content area can be adjusted dynamically.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;4. In the action class load the resourcebundle and read all the key/values that are needed on the Login page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;5. For branding, keep the URL,appname as key value in properties file and read it in the action class. Now based on the application name, display the login page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;6. To get the URL from webseal, we need to enable the macros (URL) in webseald-default.conf.  We will discuss the webseald-default.conf in later sections.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;7. For i18N, load the properties based on the locale (either get it from browser) OR show a default language page and display the option to change the locale from that page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;8. The user can enter the username and password on the page and we can write our custom validations before performing any other operation.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;9. Once the validations are complete, the user and password can be validated against LDAP/DB either through direct LDAP query or using TAM APIs.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;10. Considering that webseal is used for authorization, now the time is to submit the user to webseal.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;11. The step for final submission involves setting the response to OK (200) and flush it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-weight: bold;"&gt;* Handling the Configuration at Webseal and relate with EAI module:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;1. The desired URL needs to map to the Webseal IP in DNS.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;2. Create a standard junction for the EAI hosted on the app server. Now, make the following changes in webseald-default.conf:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;3. Set the enable-local-response-redirect to "yes".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;4. The entry for local-response-redirect-uri should contain complete URL mapping to the action class.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;5. The MACROS should be enabled for URL, USERNAME, PROTOCOL, HOSTNAME etc as per the requirement.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;6. Define a trigger, which would map to URL which is last called when submitting the response.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;7. Lastly, you should configure the common headers to record the username and URL for sending the user back to webseal.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;# Sample EAI COMMON header names&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;eai-redir-url-header = &lt;/span&gt;&lt;eai-redir-url style="font-family: arial;"&gt;&lt;br /&gt;eai-user-id-header = &lt;eai-user-id&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For the detailed knowledge, please refer to documentation on ITAM and sample code provided by IBM.&lt;/eai-user-id&gt;&lt;/eai-redir-url&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-1214638593172234186?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/1214638593172234186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=1214638593172234186&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1214638593172234186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1214638593172234186'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2010/02/itam-webseal-developing-external.html' title='ITAM - Webseal - Developing External Authentication Interface (EAI)'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6688802956961016374</id><published>2009-07-03T15:27:00.000-07:00</published><updated>2009-07-03T15:28:57.428-07:00</updated><title type='text'>What's New in IBM WebSphere Portal 6.1</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Site management&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Site management to manage the individual pages and groups of page, artifacts, and properties that make up those pages by providing an easy way to move them around between Portal environments. &lt;br /&gt;&lt;br /&gt;The new Resource Manager Portlet lets administrators create a page on a source server, then publish it to a target server where only a selected group of users can see and test the new page. After testing is complete, you can promote the new page so all users on the target server with the appropriate access rights can view the new page.&lt;br /&gt;&lt;br /&gt;Portal Administrators can use the Site Management capability by accessing the Resource Manager Portlet on the Site Management page in the Portal Administration area.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Theme Customizer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Theme Customizer portlet features a tabbed design and live preview you can use to customize key site elements including the banner, navigation, fonts, and colors, turn areas of the page on and off, and adjust the settings for areas of the page such as the navigation (figure 5). This portlet includes a wizard-driven branding and in-place customization, designed to simplify new theme style creation or updates.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Search Enhancements&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Portal Search is enhanced with features designed to enrich the search experience for users and improve Portal Search consumption. In version 6.1, searching Portal content is remotely accessible through REST Services, letting clients (e.g., Lotus Sametime) integrate search functionality. &lt;br /&gt;&lt;br /&gt;The new AJAX Search Center is based on a set of customizable components which may be Portlets or Dojo Widgets. The components are designed to be "mashed-up" to create a search experience to match the needs of each organization.&lt;br /&gt;&lt;br /&gt;You can also add a new External Search Results portlet to the Search Center. This portlet displays search results from third-party search engines such as Yahoo!, Google, or Flickr and you can configure it to display different number of results. &lt;br /&gt;&lt;br /&gt;With the new External Search Results portlet, you can extend your search by searching against external search engines and viewing their search results in the Search Center, in addition to the main search against WebSphere Portal.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Other new features&lt;/span&gt;&lt;br /&gt;New Feed reader portlet based on AJAX &lt;br /&gt;Support for portlet open standards such as JSR286 and WSRP 2.0 &lt;br /&gt;New portal Site Wizard lets users create independent virtual portals &lt;br /&gt;Updated out-of-the-box Internet and intranet site jumpstart templates&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6688802956961016374?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6688802956961016374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6688802956961016374&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6688802956961016374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6688802956961016374'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/07/whats-new-in-ibm-websphere-portal-61.html' title='What&apos;s New in IBM WebSphere Portal 6.1'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-1845671849938711257</id><published>2009-07-03T15:25:00.000-07:00</published><updated>2009-07-03T15:26:52.046-07:00</updated><title type='text'>Web 2.0 Portal theme</title><content type='html'>WebSphere Portal 6.1 comes with a new Web 2.0 Theme. The new theme uses AJAX, XSLT, and a new aggregation model called &lt;span style="font-weight:bold;"&gt;Client-Side Aggregation (CSA)&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;The Portal Web 2.0 Theme is a specialized theme which only renders the parts of the page that are changed from a user interaction. So, if there are four different portlets on a page and a user interacts with a single portlet on the page, only the portlet the user interacts with is updated. If a user selects a new page on the Portal navigation links, only the affected navigation elements are updated, and the new page contents are rendered. Rather than updating and refreshing the entire page on every user interaction, the CSA aggregator only updates the parts of the page that changed.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Client-Side Aggregation (CSA) &lt;/span&gt;reduces server-side processing and improves performance by offloading the page and portlet rendering from the server to the client, providing a richer and more responsive user experience. Previous versions of WebSphere Portal supported Server-Side Aggregation model only where JSPs were executed on the Server.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Live Text (Semantic Tags)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This new feature provides a simple way of adding semantic tags (keywords) to the HTML markup to simplify information discovery, retrieval, and navigation. For instance, in figure 2, a Live Text "pop-up" presents access to relevant information, such as e-mail address, job &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Web Application Integrator&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With Web Application Integrator, you can integrate external Web applications with WebSphere Portal providing a way of easily embedding existing Web applications into WebSphere Portal with no portlet development required. &lt;br /&gt;You perform this integration by "injecting" Portal navigation markup into the external Web application. As the Portal navigation is displayed in the Web application, the user experience suggests the user is still in the Portal environment even though he is, in reality, natively browsing the external Web application. Because the Portal navigation is displayed on the Web application, the user can navigate back to Portal by clicking on any Portal page link&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-1845671849938711257?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/1845671849938711257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=1845671849938711257&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1845671849938711257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1845671849938711257'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/07/web-20-portal-theme.html' title='Web 2.0 Portal theme'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-8499252227038390215</id><published>2009-07-03T15:13:00.000-07:00</published><updated>2009-07-03T15:22:45.459-07:00</updated><title type='text'>Steps to create New Web2.0 Skin in WebSphere portal</title><content type='html'>1. Duplicate the IBM.xsl file and rename newSkin.xsl within the xsl folder inside your &lt;br /&gt;theme &lt;br /&gt;/wps.ear/wps.war/themes/html/newTheme/xls&lt;br /&gt;&lt;br /&gt;2. In the skins/html folder, duplicate the "IBM" skin folder and rename to newSkin.&lt;br /&gt; &lt;br /&gt;3. In the head_extras_jspf file, add your new skin. Add the following line in the bootstrap function&lt;br /&gt;&lt;br /&gt;portalAggregator.page.addSkin(new &lt;br /&gt;    com.ibm.portal.aggregation.Skin("newSkin",skinResourceRoot2Id["newSkin"],""),false);&lt;br /&gt;&lt;br /&gt;note: newTheme is the custom theme&lt;br /&gt;      newSkin is the custom skin&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-8499252227038390215?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/8499252227038390215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=8499252227038390215&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8499252227038390215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8499252227038390215'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/07/steps-to-create-new-web20-skin-in.html' title='Steps to create New Web2.0 Skin in WebSphere portal'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-5529876530247519676</id><published>2009-07-03T15:11:00.000-07:00</published><updated>2009-07-03T15:12:35.034-07:00</updated><title type='text'>Accessing portlet services</title><content type='html'>This article explains how the JSR 168 portlet can retrieve and use a sample portlet service.&lt;br /&gt;&lt;br /&gt;1.JNDI lookup for a PortletServiceHome. (best pratice is to do that in the init() method of the portlet and store the returned object in an instance variable.)&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-style:italic;"&gt; import javax.portlet.*;&lt;br /&gt;   import com.ibm.portal.portlet.service.*;&lt;br /&gt;&lt;br /&gt;   private PortletServiceHome helloServiceHome = null;&lt;br /&gt;   .&lt;br /&gt;   &lt;br /&gt;   public void init(PortletConfig config)&lt;br /&gt;   {&lt;br /&gt;      javax.naming.Context ctx = new javax.naming.InitialContext();&lt;br /&gt;      try {&lt;br /&gt;          Object home = ctx.lookup("portletservice/sample.portletservice.HelloService");&lt;br /&gt;          if (home != null)&lt;br /&gt;                   helloServiceHome = (PortletServiceHome) home;&lt;br /&gt;      } catch(javax.naming.NameNotFoundException ex) {&lt;br /&gt;             config.getPortletContext().log("No hello service available");&lt;br /&gt;      }&lt;br /&gt;   }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-5529876530247519676?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/5529876530247519676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=5529876530247519676&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5529876530247519676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5529876530247519676'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/07/accessing-portlet-services.html' title='Accessing portlet services'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-8265165629709568525</id><published>2009-07-03T15:05:00.000-07:00</published><updated>2009-07-03T15:11:32.181-07:00</updated><title type='text'>Creating your own portlet service for JSR Portlets</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Defining the interface&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A portlet service interface must extend the PortletService interface defined in the com.ibm.portal.portlet.service package. The following is an example interface for the HelloWorldService .&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;package test.portletservice;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import javax.portlet.RenderRequest;&lt;br /&gt;import javax.portlet.RenderResponse;&lt;br /&gt;import com.ibm.portal.portlet.service.PortletService;&lt;br /&gt;&lt;br /&gt;public interface HelloService extends PortletService&lt;br /&gt;{&lt;br /&gt;    /** print a nice greeting */&lt;br /&gt;    public void sayHello(RenderRequest request, RenderResponse response) throws IOException;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Writing the service implementation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The service implementation must implement the PortletServiceProvider interface of the com.ibm.portal.portlet.service.spi package to be able to make use of the portlet service life cycle methods in addition to your service interface.&lt;br /&gt;&lt;br /&gt;The PortletServiceConfig parameter of the init() method allows you, for example, to access the configuration of the service.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;package test.portletservice;&lt;br /&gt;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.PrintWriter;&lt;br /&gt;import java.util.prefs.Preferences;&lt;br /&gt;&lt;br /&gt;import javax.portlet.RenderRequest;&lt;br /&gt;import javax.portlet.RenderResponse;&lt;br /&gt;&lt;br /&gt;import com.ibm.portal.portlet.service.spi.PortletServiceProvider;&lt;br /&gt; &lt;br /&gt;public class HelloServiceImpl&lt;br /&gt;    implements HelloService, PortletServiceProvider {&lt;br /&gt;    &lt;br /&gt;    private String message;&lt;br /&gt;        &lt;br /&gt;    // called by the portal when the service is initialized        &lt;br /&gt;    public void init(Preferences servicePreferences) {&lt;br /&gt;        &lt;br /&gt;        // read the message from the configuration, default is "Hello"&lt;br /&gt;        message = servicePreferences.get("message", "Hello");&lt;br /&gt;    }&lt;br /&gt;        &lt;br /&gt;    public void sayHello(RenderRequest request, RenderResponse response) throws IOException {&lt;br /&gt;        String user = request.getRemoteUser();&lt;br /&gt;        if (user == null)&lt;br /&gt;            // no user logged in&lt;br /&gt;            user = "Guest";&lt;br /&gt;        &lt;br /&gt;        PrintWriter out = response.getWriter();&lt;br /&gt;        out.print(message);&lt;br /&gt;        out.print(", ");&lt;br /&gt;        out.print(user);            &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Registering the service&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   1. Put all service interface and implementation classes into a JAR file.&lt;br /&gt;   2. Place the JAR file in the wp_root/shared/app directory.&lt;br /&gt;   3. Update the PortletServiceRegistryService.properties file in the &lt;br /&gt;    wp_root/shared/app/config/services directory&lt;br /&gt;    to register the new service:&lt;br /&gt;&lt;br /&gt;    1. Register the implementation in the JNDI directory. The syntax of this line is   &lt;br /&gt;jndi:service_interface = service_implementation. The fully qualified service interface name can then be used to lookup the service.&lt;br /&gt;&lt;br /&gt;2. Provide configuration parameters for the implementation. The syntax for configuration parameters is service_implementation.parameter=value.&lt;br /&gt;&lt;br /&gt;3. Restart the portal server.&lt;br /&gt; &lt;br /&gt;HelloService is the name of the portlet service and the message configuration parameter is set with the value Greetings.&lt;br /&gt;&lt;br /&gt;    jndi:sample.portletservice.HelloService = sample.portletservice.HelloServiceImpl&lt;br /&gt;    sample.portletservice.HelloServiceImpl.message = Greetings&lt;br /&gt;&lt;br /&gt; To check whether your service has been registered successfully, use the application server dumpNamespace tool. The following command, executed from the was_profile_root/bin directory, will list all portlet service entries in JNDI:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;    dumpNamespace -port bootstrap_port -root server -startAt portletservice&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Using the application server's administrative console, you can find the bootstrap port of your portal server in the "End Points" section of the settings for the server "WebSphere_Portal"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-8265165629709568525?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/8265165629709568525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=8265165629709568525&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8265165629709568525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8265165629709568525'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/07/creating-your-own-portlet-service-for.html' title='Creating your own portlet service for JSR Portlets'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-8719280241598208168</id><published>2009-04-02T15:35:00.001-07:00</published><updated>2009-04-03T16:28:39.886-07:00</updated><title type='text'>JSF Portlet - Shale View Framework</title><content type='html'>&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br /&gt;A POC was done to create a sample widget portlet that is able to clear the portlet state. The sample portlet created is able to clear the portlet state. The feature to clear the portlet state can be integrated to any page of the portlet.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Shale  View Framework&lt;/strong&gt;&lt;br /&gt;The approach uses the Shale View Framework. Shale supports a mechanism that provides a relationship between a presentation layer and corresponding backing bean including event handling logic, values used in the dynamic rendering of the response.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Shale view framework supports:&lt;br /&gt;&lt;/strong&gt;Portlet view can be modified before rendering.&lt;br /&gt;Multiple pages portlet can be handled using this approach.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;There are 2 pages in portal, Welcome &amp;amp; Benefits&lt;br /&gt;&lt;br /&gt;On Benefits: We have 1 portlet which has 3 jsps.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;strong&gt;Steps:&lt;/strong&gt;&lt;br /&gt;User click on Benefits Page and go to page2 (jsp2)&lt;br /&gt;Then go to Welcome page from the navigation and click on the Benefits page again&lt;br /&gt;&lt;br /&gt;In usual case, as per as portal behavior it should go to page 2, since portal caches the portlet state but with the help of Shale view framework, we can check the jsp from which the user is coming from and modify the Navigation State and forward it to page1 (jsp1)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Steps to Integrate the Shale view in the existing portlets&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1. Portlet should have the pageCode.java&lt;br /&gt;2. Add the dependency for Shale-view in pom.xml&lt;br /&gt;3. Add the Phase Listener Classs, which extends extends ViewPhaseListener and implements Ph&lt;/span&gt;&lt;span style="font-family:arial;"&gt;aseListener&lt;br /&gt;4. In the backing bean extend PageCodeBase.java and implement ViewController.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code Level changes&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Backing Bean: jsp1&lt;/em&gt;&lt;br /&gt;Set a parameter in the session when the user is going from jsp1 to jsp2&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;FacesContext facesContext = FacesContext.getCurrentInstance();&lt;br /&gt;PortletSession session =&lt;br /&gt;((PortletRequest)facesContext.getExternalContext().getRequest()).getPortletSession(false);&lt;br /&gt;session.setAttribute("pageCache", "true");&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Backing Bean: jsp2&lt;/em&gt;&lt;br /&gt;Override the prerender. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;Remove the parameter from the session in the prerender of jsp2&lt;br /&gt;&lt;strong&gt;FacesContext facesContext = FacesContext.getCurrentInstance();&lt;br /&gt;PortletSession session = ((PortletRequest)facesContext.getExternalContext().getRequest()).getPortletSession(false);&lt;br /&gt;session.setAttribute("pageCache", "false");&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;PhaseListener.java&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;if(session.getAttribute("pageCache")!=null &amp;amp;&amp;amp; session.getAttribute("pageCache").equals("false") ){&lt;br /&gt;NavigationHandler navigator = facesContext.getApplication().getNavigationHandler();&lt;br /&gt;navigator.handleNavigation(facesContext, null, "POCProjectView");&lt;br /&gt;}&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Facesconfig&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://2.bp.blogspot.com/_S-NJNrdbb0k/SdaaViI3wcI/AAAAAAAAACY/Z_QNgv0qto4/s1600-h/untitledww.bmp"&gt;&lt;span style="font-family:arial;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5320609704516764098" style="WIDTH: 353px; CURSOR: hand; HEIGHT: 232px" alt="" src="http://2.bp.blogspot.com/_S-NJNrdbb0k/SdaaViI3wcI/AAAAAAAAACY/Z_QNgv0qto4/s320/untitledww.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-8719280241598208168?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8719280241598208168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/8719280241598208168'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/04/jsf-portlet-shale-view-framework.html' title='JSF Portlet - Shale View Framework'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_S-NJNrdbb0k/SdaaViI3wcI/AAAAAAAAACY/Z_QNgv0qto4/s72-c/untitledww.bmp' height='72' width='72'/></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-5823287469796906872</id><published>2009-01-12T23:39:00.000-08:00</published><updated>2010-02-07T14:19:48.595-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSR286'/><category scheme='http://www.blogger.com/atom/ns#' term='Public render parameters'/><title type='text'>Public Render Parameters</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;In JSR 168, the render parameters set in processAction is only available in the render of the same portlet.&lt;br /&gt;With the Public Render Parameters feature, the render parameters set in the processAction of one portlet will be available in render of other portlets also. Using public render parameters instead of events avoids the additional process event call.&lt;/span&gt; &lt;div&gt;&lt;div&gt;&lt;span style="font-family:arial;"&gt;&lt;div&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;In order to allow coordination of render parameters with other portlets, within the same portlet application or across portlet applications, the portlet can declare public render parameters in its deployment descriptor using the public-render-parameter element in the portlet application section. Public render parameters can be viewed and changed by other portlets or components. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;In the portlet section each portlet can specify the public render parameters it would like to share via the supported-public-render-parameter element. The supported-public-render-parameter element must reference the identifier of a public render parameter defined in the portlet application section in a public-render-parameter element.&lt;br /&gt;In the code, the portlets should use the defined public render parameter identifier to access the public render parameter&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Steps to create a portlet with the Render parameters&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Declare the render parameters to be shared in the portlet.xml&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div align="center"&gt;&lt;a href="http://4.bp.blogspot.com/_S-NJNrdbb0k/SWxGL5kycNI/AAAAAAAAABw/XDeu53ux50A/s1600-h/aa.bmp"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;&lt;img id="BLOGGER_PHOTO_ID_5290680832501117138" style="width: 320px; height: 139px;" alt="" src="http://4.bp.blogspot.com/_S-NJNrdbb0k/SWxGL5kycNI/AAAAAAAAABw/XDeu53ux50A/s320/aa.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Specify the render parameter that the portlet would like to share in the portlet section&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_S-NJNrdbb0k/SWxGs8q1X4I/AAAAAAAAAB4/jTYejhmtKD4/s1600-h/aa.bmp"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;&lt;img id="BLOGGER_PHOTO_ID_5290681400267464578" style="width: 320px; height: 99px;" alt="" src="http://3.bp.blogspot.com/_S-NJNrdbb0k/SWxGs8q1X4I/AAAAAAAAAB4/jTYejhmtKD4/s320/aa.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;Set the render parameter in the processAction() method&lt;/span&gt; &lt;div align="center"&gt;&lt;a href="http://2.bp.blogspot.com/_S-NJNrdbb0k/SWxG9kVleEI/AAAAAAAAACA/6tuHCrEqy-s/s1600-h/aa.bmp"&gt;&lt;span style="color: rgb(0, 0, 0);font-size:85%;" &gt;&lt;img id="BLOGGER_PHOTO_ID_5290681685793667138" style="width: 320px; height: 105px;" alt="" src="http://2.bp.blogspot.com/_S-NJNrdbb0k/SWxG9kVleEI/AAAAAAAAACA/6tuHCrEqy-s/s320/aa.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-5823287469796906872?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/5823287469796906872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=5823287469796906872&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5823287469796906872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5823287469796906872'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/01/public-render-parameters.html' title='Public Render Parameters'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_S-NJNrdbb0k/SWxGL5kycNI/AAAAAAAAABw/XDeu53ux50A/s72-c/aa.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-5394248214204055278</id><published>2009-01-12T23:13:00.000-08:00</published><updated>2010-02-07T14:20:20.779-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSR 286'/><category scheme='http://www.blogger.com/atom/ns#' term='eventing steps'/><title type='text'>JSR286 : Eventing Feature</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;Eventing can be described as a loosely coupled, brokered means of communication between portlets. It is intended to allow portlets to react on actions or state changes not directly related to an interaction of the user with the portlet.&lt;br /&gt;Events are a lifecycle operation that occurs before the rendering phase.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;&lt;strong&gt;Steps to have eventing feature in Portlet&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;1. Declare the events in the portlet.xml&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);font-family:arial;font-size:85%;"  &gt;Set the event definition at the portlet application level. This specifies the event name and the object type.&lt;br /&gt;Note: The object must be serializable and must be instrumented with valid JAXB annotation &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt; &lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_S-NJNrdbb0k/S28sdw0etfI/AAAAAAAAACo/YmqiyI3CgQ4/s1600-h/Picture+4.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 194px;" src="http://3.bp.blogspot.com/_S-NJNrdbb0k/S28sdw0etfI/AAAAAAAAACo/YmqiyI3CgQ4/s320/Picture+4.png" alt="" id="BLOGGER_PHOTO_ID_5435612165092324850" border="0" /&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/_S-NJNrdbb0k/SWxBIC9yXkI/AAAAAAAAABI/rn659WvgUx8/s1600-h/aa.bmp"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;img id="BLOGGER_PHOTO_ID_5290675268744273474" style="width: 320px; height: 198px;" alt="" src="http://1.bp.blogspot.com/_S-NJNrdbb0k/SWxBIC9yXkI/AAAAAAAAABI/rn659WvgUx8/s320/aa.bmp" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="left"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;2. In the portlet section, specify the event name defined above for those portlets that want to publish this event. &lt;/span&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_S-NJNrdbb0k/SWxBvtiiEaI/AAAAAAAAABQ/EY47xWQN-5I/s1600-h/aa.bmp"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_S-NJNrdbb0k/S282x48vL8I/AAAAAAAAACw/YS7Zm6pWUE4/s1600-h/Picture+3.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 78px;" src="http://4.bp.blogspot.com/_S-NJNrdbb0k/S282x48vL8I/AAAAAAAAACw/YS7Zm6pWUE4/s320/Picture+3.png" alt="" id="BLOGGER_PHOTO_ID_5435623505988104130" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;3. In the portlet section, specify the event name defined above for those portlets that want to process this event.&lt;br /&gt;&lt;portlet&gt;&lt;/portlet&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_S-NJNrdbb0k/S286zpggCVI/AAAAAAAAADI/aBVAiM26iVI/s1600-h/Picture+2.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 119px;" src="http://4.bp.blogspot.com/_S-NJNrdbb0k/S286zpggCVI/AAAAAAAAADI/aBVAiM26iVI/s320/Picture+2.png" alt="" id="BLOGGER_PHOTO_ID_5435627934249388370" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_S-NJNrdbb0k/SWxDJ0eZvWI/AAAAAAAAABY/uZQtA6VJ9Fg/s1600-h/aa.bmp"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;4. Issue an event in the portlet that was specified as supported-publishing-event in the portlet. &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_S-NJNrdbb0k/S283BQKqd6I/AAAAAAAAAC4/7sh_9YblwQs/s1600-h/Picture+8.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 136px;" src="http://1.bp.blogspot.com/_S-NJNrdbb0k/S283BQKqd6I/AAAAAAAAAC4/7sh_9YblwQs/s320/Picture+8.png" alt="" id="BLOGGER_PHOTO_ID_5435623769918568354" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;5. Process the event in the portlet that has specified as supported-processing-event in the portlet&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_S-NJNrdbb0k/S288DIwvIwI/AAAAAAAAADQ/zPyrbVNXAWs/s1600-h/Picture+3.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 86px;" src="http://1.bp.blogspot.com/_S-NJNrdbb0k/S288DIwvIwI/AAAAAAAAADQ/zPyrbVNXAWs/s320/Picture+3.png" alt="" id="BLOGGER_PHOTO_ID_5435629299848651522" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-5394248214204055278?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/5394248214204055278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=5394248214204055278&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5394248214204055278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/5394248214204055278'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/01/jsr268-eventing-feature.html' title='JSR286 : Eventing Feature'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_S-NJNrdbb0k/S28sdw0etfI/AAAAAAAAACo/YmqiyI3CgQ4/s72-c/Picture+4.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-4847668218401771369</id><published>2009-01-12T23:11:00.000-08:00</published><updated>2009-01-12T23:13:32.332-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSR 286'/><category scheme='http://www.blogger.com/atom/ns#' term='JSR168'/><category scheme='http://www.blogger.com/atom/ns#' term='specifications'/><title type='text'>JSR 168 and 286 Specification</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;Portlets are Web-based components managed by portlet containers that supply dynamic content. Portals employ portlets as pluggable user-interface components—a presentation layer—for information systems. The Java Portlet Specification achieves interoperability among portlets and portals by defining the APIs for portlets and by standardizing the rules for preferences, user data, portlet requests and responses, deployment, packaging, and security. Java Portlet Specification 1.0, &lt;/span&gt;&lt;a href="http://jcp.org/aboutJava/communityprocess/final/jsr168/" target="_blank"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Java Specification Request (JSR) 168&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;, was released in October 2003.&lt;br /&gt;In February 2006, the JSR 286 Expert Group was formed to start work on Java Portlet Specification 2.0. When that is finalized, backward compatibility will be in place: JSR 168 portlets will be able to run seamlessly in JSR 286 portlet containers. No recompilation will be necessary.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;strong&gt;What new in JSR 286?&lt;/strong&gt;       &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Eventing&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Public Render Parameters &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Resource Serving &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Portlet Filters &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Validation based caching &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Request Dispatcher Include from all lifecycle &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Request Dispatcher Forward from all lifecycle &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Container Runtime Options that includes escapeXml and actionScopedRequestAttributes &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Taglibrary enhancements&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-4847668218401771369?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/4847668218401771369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=4847668218401771369&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4847668218401771369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4847668218401771369'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2009/01/jsr-168-and-286-specification.html' title='JSR 168 and 286 Specification'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6946936205109653094</id><published>2008-12-08T14:58:00.001-08:00</published><updated>2009-01-09T12:31:25.539-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='skin code'/><category scheme='http://www.blogger.com/atom/ns#' term='Websphere portal'/><category scheme='http://www.blogger.com/atom/ns#' term='Portal'/><category scheme='http://www.blogger.com/atom/ns#' term='Skins'/><category scheme='http://www.blogger.com/atom/ns#' term='Themes'/><category scheme='http://www.blogger.com/atom/ns#' term='theme code'/><title type='text'>Themes &amp; Skins : WebSphere Portal</title><content type='html'>&lt;span style="font-size:85%;color:#000000;"&gt;The portal page is composed of JSPs for screens, themes, and skins that are typically created by the Web designer of the portal. &lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Themes&lt;/strong&gt; :It provide the navigation, appearance, and layout of the portal, including colors, fonts, and images outside of the portlet content area. &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="color:#000000;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Screens&lt;/strong&gt;:The area of the portal that typically displays portlets, but can also display other content in its place, for example, a login form or error message. Screens are selected from navigation icons in the theme. &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Skins&lt;/strong&gt;:It represent the border rendering around components, such as row containers, column containers, or portlets. Skins are installed independently from themes. However, the administrator can set a default skin for a theme. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Themes:&lt;/strong&gt;&lt;br /&gt;It is best practice to copy the IBM directory, give it your own name, and then use that for your sample. Also, it is best to assign it to a page only, and not the whole portal, while developing it. The portal page is rendered starting with Default.jsp in the /themes directory.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000000;"&gt;The starting place for building the portal page is Default.jsp in the /themes directory. The screen and skin are called by the corresponding &lt;?xml:namespace prefix = portal /&gt;&lt;portal:screenrender&gt;&lt;/portal:screenrender&gt;and &lt;portal:pagerender&gt;&lt;/portal:pagerender&gt;tags from the engine tag library.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;a href="http://3.bp.blogspot.com/_S-NJNrdbb0k/ST2zSgqhQgI/AAAAAAAAAAw/GaDqGPIUjPs/s1600-h/a.JPG"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5277571468935381506" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 123px" alt="" src="http://3.bp.blogspot.com/_S-NJNrdbb0k/ST2zSgqhQgI/AAAAAAAAAAw/GaDqGPIUjPs/s320/a.JPG" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;&lt;span style="font-size:85%;color:#000000;"&gt;JSP in theme: &lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Head.jspf: Head.jsp provides the necessary header information to correctly render the portal page. This file is used to link the style sheets and set the page title and the text direction. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Banner.jspf. This fragment is the first visible JSP fragment to be included in the portal. It represents the top layer of the page and it holds the launch button, the breadcrumb trail, the search control, and the toolbar JSPF files. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;TopNav.jspf. This fragment controls the look and feel of the top navigational bar. This bar can be one or two layers, depending on the theme policy selected. Edit this JSP file if you want to create a drop-down navigational structure. The file also holds logic to render the context menus for the page. Appendixes A and B show additional variations on the navigation of the WebSphere Portal site. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;SideNav.jspf. This fragment controls the side navigation and only has visible content if needed. This page also has logic to expand and contract the child pages and build the context menus for the pages. &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Footer.jspf. The final fragment is the footer, which holds the normal footer information for page navigation and quick links to other pages for the users. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Skins:&lt;/strong&gt;&lt;br /&gt;Skins represent the border rendering around components, such as row containers, column containers, or portlets. The skin is loaded in the portal page by the &lt;portal:pagerender&gt;&lt;/portal:pagerender&gt;tag. Skins are installed independently from themes. However, a skin can be associated with a theme.&lt;br /&gt;Skins define more than the look and feel of portlets; they define the look and feel of components. These components include the navigation, containers, and controls. This hierarchical structure is depicted in the following diagram. &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p align="center"&gt;&lt;a href="http://1.bp.blogspot.com/_S-NJNrdbb0k/ST2zr0kWFcI/AAAAAAAAAA4/5Z6aG1-CPRI/s1600-h/skin_layout.jpg"&gt;&lt;span style="font-size:85%;color:#000000;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5277571903774922178" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 211px" alt="" src="http://1.bp.blogspot.com/_S-NJNrdbb0k/ST2zr0kWFcI/AAAAAAAAAA4/5Z6aG1-CPRI/s320/skin_layout.jpg" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;span style="font-size:85%;color:#000000;"&gt;The components of the skin are called in the following order. &lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;The &lt;/span&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v510/topic/com.ibm.wp.ent.doc/wps/dgn_ptltld.html"&gt;&lt;portal:pagerender&gt;&lt;/portal:pagerender&gt;&lt;/a&gt;&lt;span style="font-size:85%;color:#000000;"&gt;tag in the default.jsp, displays the components for the selected node. The components are implemented as row containers, column containers, and controls depending upon the portal layout that is defined in &lt;/span&gt;&lt;span style="font-size:85%;color:#000000;"&gt;portal page customization&lt;/span&gt;&lt;span style="font-size:85%;color:#000000;"&gt;. Controls are displayed using Control.jsp. The figure in &lt;/span&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Underlying layout of the home screen&lt;/span&gt;&lt;span style="font-size:85%;color:#000000;"&gt; depicts one row container that has two column containers, each containing two portlets. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;The row and column containers display their nested components using either Java code or the &lt;/span&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v510/topic/com.ibm.wp.ent.doc/wps/dgn_ptltld.html"&gt;&lt;portal:componentloop&gt;&lt;/portal:componentloop&gt;&lt;/a&gt;&lt;span style="font-size:85%;color:#000000;"&gt;and &lt;/span&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v510/topic/com.ibm.wp.ent.doc/wps/dgn_ptltld.html"&gt;&lt;portal:componentrender&gt;&lt;/portal:componentrender&gt;&lt;/a&gt;&lt;span style="font-size:85%;color:#000000;"&gt;elements. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Each portlet is rendered by the &lt;/span&gt;&lt;a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v510/topic/com.ibm.wp.ent.doc/wps/dgn_ptltld.html"&gt;&lt;portal:portletrender&gt;&lt;/portal:portletrender&gt;&lt;/a&gt;&lt;span style="font-size:85%;color:#000000;"&gt;tag within the Control.jsp. file. The control also builds the border and title bar around the portlet output. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:85%;color:#000000;"&gt;JSPs of Skin &lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Control.jsp. This file controls the look and feel of the portlet itself. It renders the menu items, the title bar, and the table that holds the portlet content. It also provides drag-and-drop handles for moving the portlet around on the portlet page. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;UnlayeredContainer-V.jsp. This file controls the vertical columns for the portlets and how they are arranged within that column. The tags in the JSP file help control the drag-and-drop feature. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;UnlayeredContainer-H.jsp. This file controls the horizontal appearance of the portlets and can contain the UnlayeredContainer-V.jsp.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;&lt;strong&gt;Deploying the Theme and skin&lt;br /&gt;&lt;/strong&gt;Copy the above created theme and skin in the below mentioned path &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Themes : /software/WebSphere60/AppServer/profiles/wp_profile/installedApps/Cell /wps.ear/wps.war/themes/html &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Skins:/software/WebSphere60/AppServer/profiles/wp_profile/installedApps/Cell/wps.ear/wps.war/skins/html &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Themes and skins can be deployed using the Administration console or using XMLaccess scripts &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Through Admin Console: &lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Login the portal &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Got to the Portal admin Console To add the theme, use the Themes and Skins portlet under Administration &gt; Portal User Interface &gt; Themes and Skins &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Click on add new theme. Enter the following field (s) :&lt;br /&gt;· Theme name and default locale title&lt;br /&gt;· Theme directory name &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Click on Ok Button. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Theme is deployed. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Same steps need to be follow to deploy the skin. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000000;"&gt;Through XML Access : See the XMLAccess script article&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6946936205109653094?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6946936205109653094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6946936205109653094&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6946936205109653094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6946936205109653094'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2008/12/themes-skins-websphere-portal.html' title='Themes &amp; Skins : WebSphere Portal'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_S-NJNrdbb0k/ST2zSgqhQgI/AAAAAAAAAAw/GaDqGPIUjPs/s72-c/a.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6548165734262801079</id><published>2008-12-08T14:20:00.000-08:00</published><updated>2008-12-17T13:56:18.736-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSR 286'/><category scheme='http://www.blogger.com/atom/ns#' term='JSR 286  vs JSR 168'/><category scheme='http://www.blogger.com/atom/ns#' term='Portal'/><category scheme='http://www.blogger.com/atom/ns#' term='Portlet'/><title type='text'>JSR 286 vs JSR 168</title><content type='html'>&lt;table cellspacing="0" cellpadding="0" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;&lt;span style="font-size:85%;"&gt;Features &lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span style="font-size:85%;"&gt;JSR 168 Specification&lt;/span&gt;&lt;/th&gt;&lt;th&gt;&lt;span style="font-size:85%;"&gt;JSR 286 Specification &lt;/span&gt;&lt;/th&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Inter Portlet Communication&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Only supported within the same portlet application using session attributes&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Target portlets will only "see" messages during next render request. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Add additional coordination capabilities &lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Limited only to String Values.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Sharing of session data beyond the current Portlet application.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Sharing of render parameters across portlets.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Life cycle&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Portlets cannot update their state during a render request: "event" handling not really possible&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;New 3rd life cycle phase before rendering &lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Portlet Filters&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Doesn't Support &lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Supports Allow on the fly transformations of information in both the request to and the response from the portlet&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Defined in portlet.xml &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Caching&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Extended Cache support. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Allow public cached content for multiple users&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Common Web Frameworks &lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Servlet dispatching not supported from process Action.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Needs Portals Bridges or similar solutions.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;JSTL support very limited &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Extended Cache support.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Allow public cached content for multiple users.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Improved support for web frameworks (Struts, JSF, Spring) Allow servlet dispatching during all lifecycle calls: processAction, processEvent, render, serverResource.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Extended JSP tag library &amp;lt;defineObjects/&amp;gt;, support for JSF &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;Non HTML Resources(pdf, doc, images etc.)&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;A portlet can only render html fragments.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Have to fallback/delegate to the servlet container.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Requires coordination between portlet and servlet. &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/td&gt;&lt;td&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6548165734262801079?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6548165734262801079/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6548165734262801079&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6548165734262801079'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6548165734262801079'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2008/12/jsr-286-vs-jsr-168.html' title='JSR 286 vs JSR 168'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6159013799739024672</id><published>2008-12-07T15:42:00.000-08:00</published><updated>2008-12-17T13:56:46.573-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSF vs Struts'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Struts'/><title type='text'>JSF vs Struts</title><content type='html'>&lt;table cellspacing="0" cellpadding="0" border="1"&gt;&lt;th&gt;Features&lt;/th&gt;&lt;th&gt;Struts&lt;/th&gt;&lt;th&gt;JSF&lt;/th&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts isn't client device independence&lt;/td&gt;&lt;td&gt;Faces is client device independence&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts tags aren't as well suited to complex widgets such as trees and tab panels.&lt;/td&gt;&lt;td&gt;Faces supports&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts do not support 'code behind files' concept.&lt;/td&gt;&lt;td&gt;Faces supports 'code behind files' concept.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts form Beans can span pages.&lt;/td&gt;&lt;td&gt;Faces use a cleaner approach in complex applications.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts DynaActionForm instances can be authored automatically.&lt;/td&gt;&lt;td&gt;No support in the JSF framework to author backing beans automatically.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Request Processing and Navigation&lt;/td&gt;&lt;td&gt;Struts uses the returned ActionForward instance.&lt;/td&gt;&lt;td&gt;JSF uses logical outcomes from a java method to feed into the navigation rule base.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Model Tier access&lt;/td&gt;&lt;td&gt;Not Supported&lt;/td&gt;&lt;td&gt;JSF uses the ValueBinding API.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts creates form beans. DynaActionForms enables to pre-configure the initial properties of the form.&lt;/td&gt;&lt;td&gt;JSF has a much richer bean creation story.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts uses commons-beanutils for bean hierarchy navigation&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Component Event&lt;/td&gt;&lt;td&gt;Struts has no notion of components but the struts-faces integration library allows you to use the JSF component model, and keep your Struts based back end logic.&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;It has no notion of component state.&lt;/td&gt;&lt;td&gt;Faces have an excellent state management strategy in saving the state on the client or the server.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts has no event model on web.&lt;/td&gt;&lt;td&gt;Faces brings a JavaBeans like event model to the web.&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Conversion and Validation&lt;/td&gt;&lt;td&gt;Both support type Conversion&lt;/td&gt;&lt;td&gt;Faces is more powerful&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Struts Action class is tightly coupled to ActionServlet, can call its methods.&lt;/td&gt;&lt;td&gt;JSF invoke FacesServlet&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6159013799739024672?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6159013799739024672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6159013799739024672&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6159013799739024672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6159013799739024672'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2008/12/jsf-vs-struts.html' title='JSF vs Struts'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-6842753200918923845</id><published>2008-12-07T15:19:00.000-08:00</published><updated>2008-12-17T13:57:06.102-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Portal'/><category scheme='http://www.blogger.com/atom/ns#' term='Websphere'/><category scheme='http://www.blogger.com/atom/ns#' term='Portlet'/><title type='text'>Portal and its Components</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="color:#333333;"&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#333333;"&gt;Portlets provide a componentized user interface (UI) for services. In a Service Oriented Architecture (SOA) one does not write monolithic applications, but separate services that can be orchestrated together into applications.&lt;br /&gt;&lt;br /&gt;This service orchestration benefits from componentized UIs for the services -- monolithic web UIs based on servlets are no longer sufficient. This is where Porlets play a central role.&lt;br /&gt;&lt;br /&gt;The following diagram is useful to understand Portal and Portlet concepts.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="color:#333333;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://4.bp.blogspot.com/_S-NJNrdbb0k/STxa_aYMWLI/AAAAAAAAAAg/nTeq-nj_Bzw/s1600-h/2.GIF"&gt;&lt;span style="font-family:arial;font-size:85%;color:#333333;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5277192908830431410" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 236px" alt="" src="http://4.bp.blogspot.com/_S-NJNrdbb0k/STxa_aYMWLI/AAAAAAAAAAg/nTeq-nj_Bzw/s320/2.GIF" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a name="_Toc190056887"&gt;&lt;/a&gt;&lt;a name="_Toc188280588"&gt;&lt;/a&gt;&lt;a name="_Toc188280514"&gt;&lt;span style="font-family:arial;font-size:85%;color:#333333;"&gt;&lt;strong&gt;What is a Portlet&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-family:arial;font-size:85%;color:#333333;"&gt;&lt;br /&gt;&lt;br /&gt;Portlets are pluggable user interface components that are managed and displayed in a web portal. Portlets produce fragments of markup code that are aggregated into a portal page.&lt;br /&gt;&lt;br /&gt;Typically, following the desktop metaphor, a portal page is displayed as a collection of non-overlapping portlet windows, where each portlet window displays a portlet. Hence a portlet (or collection of portlets) resembles a web-based application that is hosted in a portal.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a name="_Toc190056888"&gt;&lt;/a&gt;&lt;a name="_Toc188280589"&gt;&lt;/a&gt;&lt;a name="_Toc188280515"&gt;&lt;span style="font-family:arial;font-size:85%;color:#333333;"&gt;&lt;strong&gt;Portlet Modes&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#333333;"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;Portlets have several modes and states including:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;MODES&lt;/strong&gt;: VIEW, EDIT, HELP&lt;br /&gt;&lt;strong&gt;STATES&lt;/strong&gt;: NORMAL, MAXIMIZED, MINIMIZED&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A portlet mode indicates the function a portlet is performing in the render method. Normally, portlets perform different tasks and create different content depending on the function they are currently performing. A portlet mode advises the portlet what task it should perform and what content it should generate. When invoking a portlet, the portlet container provides the current portlet mode to the portlet. Portlets can programmatically change their portlet mode when processing an action request.&lt;br /&gt;&lt;br /&gt;The Portlet Specification defines three portlet modes, VIEW, EDIT, and HELP. The availability of the portlet modes, for a portlet, may be restricted to specific user roles by the portal. For example, anonymous users could be allowed to use the VIEW and HELP portlet modes but only authenticated users could use the EDIT portlet mode.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;VIEW MODE&lt;/strong&gt; (required)&lt;br /&gt;The expected functionality for a portlet in VIEW portlet mode is to generate markup reflecting the current state of the portlet.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;EDIT MODE&lt;/strong&gt; (optional)&lt;br /&gt;Within the EDIT portlet mode, a portlet should provide content and logic that lets a user customize the behavior of the portlet. The EDIT portlet mode may include one or more screens among which users can navigate to enter their customization data.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HELP MODE&lt;/strong&gt; (optional)&lt;br /&gt;When in HELP portlet mode, a portlet should provide help information about the portlet. This help information could be a simple help screen explaining the entire portlet in coherent text or it could be context-sensitive help.&lt;br /&gt;&lt;br /&gt;Examples of View &amp;amp; Edit mode:&lt;br /&gt;&lt;br /&gt;Portlet - View Mode:&lt;br /&gt;Portlet – Edit Mode:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://3.bp.blogspot.com/_S-NJNrdbb0k/STxcK39lkBI/AAAAAAAAAAo/O9z3oWzuBN0/s1600-h/3.gif"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;&lt;img id="BLOGGER_PHOTO_ID_5277194205262090258" style="WIDTH: 320px; CURSOR: hand; HEIGHT: 256px" alt="" src="http://3.bp.blogspot.com/_S-NJNrdbb0k/STxcK39lkBI/AAAAAAAAAAo/O9z3oWzuBN0/s320/3.gif" border="0" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a name="_Toc190056889"&gt;&lt;span style="font-family:arial;font-size:85%;color:#333333;"&gt;&lt;strong&gt;Portlet Window States&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="color:#333333;"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;The Portlet Specification defines three window states, NORMAL, MAXIMIZED and MINIMIZED.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;NORMAL&lt;/strong&gt; window state indicates that a portlet may be sharing the page with other portlets. It may also indicate that the target device has limited display capabilities. Therefore, a portlet should restrict the size of its rendered output in this window state.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;MAXIMIZED&lt;/strong&gt; window state is an indication that a portlet may be the only portlet being rendered in the portal page, or that the portlet has more space compared to other portlets in the portal page. A portlet may generate richer content when its window state is MAXIMIZED.&lt;br /&gt;&lt;br /&gt;When a portlet is in &lt;strong&gt;MINIMIZED&lt;/strong&gt; window state, the portlet should only render minimal output or no output at all. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-6842753200918923845?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/6842753200918923845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=6842753200918923845&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6842753200918923845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/6842753200918923845'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2008/12/portal-and-its-components.html' title='Portal and its Components'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_S-NJNrdbb0k/STxa_aYMWLI/AAAAAAAAAAg/nTeq-nj_Bzw/s72-c/2.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-1581505207921948427</id><published>2008-12-07T14:49:00.000-08:00</published><updated>2008-12-17T13:57:35.415-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Clipping'/><category scheme='http://www.blogger.com/atom/ns#' term='Portal'/><category scheme='http://www.blogger.com/atom/ns#' term='Websphere'/><title type='text'>Web Clipping - WebSphere Portal</title><content type='html'>&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;Web clipping allows user to build portlets that consume external content and filter it to present a view of only the relevant portions of that content.&lt;br /&gt;&lt;br /&gt;The first step in creating a new Web clipper is to specify the basic settings that tell the Web clipping portlet what to name the new Web clipper and the base URL of the external content to serve as the content of the new Web clipper.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;&lt;strong&gt;Steps to ceate a Web Clip.&lt;/strong&gt;&lt;/span&gt; &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;Go to Administration sceen of WebSphere Portal&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;Click on Portlet Management &lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;Select Web Clipping&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;Select “Add new portlet”.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;Specific the values for title and “url to clip”.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-family:arial;font-size:85%;color:#000000;"&gt;Click on next&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color:#000000;"&gt;The next step in creating a new Web clipper is to clip the contents of the URL specified on the Basic Settings page. Clipping a Web page is the process of selecting elements of the page to be retained in the output of a Web clipper. Only those selected (clipped) elements will be displayed within the output of the Web clipper. All other elements will be discarded, that is, not displayed in the output. There are three methods for clipping the contents of the page within the Web clipping portlet.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;N&lt;/span&gt;&lt;span style="color:#000000;"&gt;ow we have to add the portlet on the page.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-1581505207921948427?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/1581505207921948427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=1581505207921948427&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1581505207921948427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/1581505207921948427'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2008/12/web-clipping.html' title='Web Clipping - WebSphere Portal'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1260189105340784848.post-4215090669170611495</id><published>2008-12-07T11:53:00.000-08:00</published><updated>2008-12-17T13:57:58.782-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Websphere portal'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='Portlet'/><category scheme='http://www.blogger.com/atom/ns#' term='XML Access'/><title type='text'>XML Access Script - WebSphere Portal</title><content type='html'>&lt;span style="font-size:85%;"&gt;XMLAccess is a command-line batch-processing utility that is incredibly useful for exporting and importing various portal configurations. It can be used for backing up the configuration of certain environments, for loading new configurations (for new portlets or pages, for example), or for updating existing portlets when a new WAR file is provided by development. Perhaps most important, this tool greatly eases the duplication of a portal environment from server "A" to server "B."&lt;br /&gt;&lt;br /&gt;XMLAccess connects to the portal configuration URL over HTTP (usually something like: http://myhost:10038/wps/config&lt;br /&gt;&lt;br /&gt;The syntax for the command is as follows:&lt;br /&gt;1. Command for Base portalxmlaccess -user wpsadmin -pwd itso -in file.xml -out result.xml -url myhost:10038/wps/config&lt;br /&gt;&lt;br /&gt;2. Command for Virtual portal&lt;br /&gt;xmlaccess -user wpsadmin -pwd itso -in input.xml -out output.xml -url myhost:10038/wps/config/&amp;lt;virtualportalname&amp;gt;&lt;br /&gt;&lt;br /&gt;In the command line, use the following file names:&lt;br /&gt;• input.xml: The name of a file containing the XML request (configuration export or update) that should be processed.&lt;br /&gt;• output.xml: The name of the result file containing the XML output/error (configuration export).&lt;br /&gt;• url: The URL to access the Portal configuration servlet. This URL consists of the Portal host name, the base Uniform Resource Identifier for the Portal, as specified during installation (for example /wps), the servlet extension /config and the virtual portal name.&lt;br /&gt;&lt;br /&gt;You can use the XMLAccess tool to transfer a complete configuration, including:&lt;br /&gt;• Portlets&lt;br /&gt;• Access Control List&lt;br /&gt;• Portal Web application configurations (portlet applications)&lt;br /&gt;• Portal skin definitions&lt;br /&gt;• Portal theme definitions&lt;br /&gt;• Portal portlet configurations&lt;br /&gt;• Portal site map (pages, labels, and links)&lt;br /&gt;• Portal URL mappings&lt;br /&gt;• Creation of clones/instances&lt;br /&gt;• Deployment of war files&lt;br /&gt;• Create the virtual portal&lt;br /&gt;&lt;br /&gt;Basic Examples:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Deployment of war file:&lt;br /&gt;&lt;br /&gt;&amp;lt;web-app action="update" active="true" uid="worldclock_app_id.webmod"&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;file:///$server_root$/installableApps/StdWorldClock.war&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;portlet-app action="update" active="true" uid="worldclock_app_id"&amp;gt;&lt;br /&gt;&amp;lt;portlet action="update" active="true" objectid="id.com.portlet.worldclock"&lt;br /&gt;name="StdWorldClock" &amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;access-control owner="undefined" private="false"&amp;gt;&lt;br /&gt;&amp;lt;role actionset="Privileged User" update="set"&amp;gt;&lt;br /&gt;&amp;lt;mapping subjectid="cn=admin,ou=groups,o=org.com" subjecttype="usergroup"&lt;br /&gt;update="set"/&amp;gt;&lt;br /&gt;&amp;lt;/role&amp;gt;&lt;br /&gt;&amp;lt;role actionset="User" update="set"&amp;gt;&amp;lt;/role&amp;gt;&lt;br /&gt;&amp;lt;/access-control&amp;gt;&lt;br /&gt;&amp;lt;/portlet&amp;gt;&lt;br /&gt;&amp;lt;/portlet-app&amp;gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;br /&gt;2. Adding portlet on page&lt;br /&gt;&lt;br /&gt;&amp;lt;content-node action="update" objectid="id.com.clock.page.new" uniquename="id.com.clock.page.new" themeref="TestoPortal" skinref="undefined"&amp;gt;&lt;br /&gt;&amp;lt;component action="update" ordinal="100" type="container" orientation="H"&amp;gt;&lt;br /&gt;&amp;lt;component action="update" ordinal="100" type="container" orientation="V" &amp;gt;&lt;br /&gt;&amp;lt;component action="update" ordinal="100" type="control" uniquename="un.com.win.clock.portlet"&amp;gt;&lt;br /&gt;&amp;lt;portletinstance action="update" objectid="un.com.win.clock.portlet.id"&lt;br /&gt;portletref=" id.com.portlet.worldclock"/&amp;gt;&lt;br /&gt;&amp;lt;/component&amp;gt;&lt;br /&gt;&amp;lt;/component&amp;gt;&lt;br /&gt;&amp;lt;/component&amp;gt;&lt;br /&gt;&amp;lt;/content-node&amp;gt;&lt;br /&gt;&lt;br /&gt;3. Create page/Label/URL, Access control and URL mapping&lt;br /&gt;&amp;gt; For label: type=”label”&lt;br /&gt;&amp;gt; For Page : type=”page”&lt;br /&gt;&lt;br /&gt;&amp;lt;content-node action="locate" objectid="6_9AO19TE0004HE029EDJVR90026" uniquename="ibm.portal.Home"/&amp;gt;&lt;br /&gt;&amp;lt;content-node content-parentref="6_9AO19TE0004HE029EDJVR90026" action="update" active="true" objectid="id.com.welcome.page.new" uniquename="id.hr.benefits.page.new" type="page" themeref="&amp;lt;themename&amp;gt;" skinref="undefined"&amp;gt;&lt;br /&gt;&amp;lt;supported-markup markup="html" update="set"/&amp;gt;&lt;br /&gt;&amp;lt;localedata locale="en"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Welcome&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/localedata&amp;gt;&lt;br /&gt;&amp;lt;/content-node&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;gt; URL: there are 2 types of URLS&lt;br /&gt;External URL&lt;br /&gt;Internal URL&lt;br /&gt;&amp;lt;content-node content-parentref="6_9AO19TE0004HE029EDJVR90026" action="update" active="true" objectid="id.com.yahoo.page.new" uniquename=" id.com.yahoo.page.new " type="external-url" themeref="&amp;lt;themename&amp;gt;" skinref="undefined"&amp;gt;&lt;br /&gt;&amp;lt;supported-markup markup="html" update="set"&amp;gt;http:yahoo.com&amp;lt;/supported-markup&amp;gt;&lt;br /&gt;&amp;lt;localedata locale="en"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;External Link to Yahoo&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/localedata&amp;gt;&lt;br /&gt;&amp;lt;/content-node&amp;gt;&lt;br /&gt;Internal URL:&lt;br /&gt;&lt;br /&gt;4. URL mapping : Create theURL mapping in the specified virtual portal.&lt;br /&gt;&lt;br /&gt;&amp;lt;url-mapping-context action="update" label="&amp;lt;vportalname&amp;gt;" objectid="vportalId"&amp;gt;&lt;br /&gt;&amp;lt;portal-url resourceref="root"/&amp;gt;&lt;br /&gt;&amp;lt;url-mapping-context action="update" label="um id.com.welcome.page.new "&amp;gt;&lt;br /&gt;&amp;lt;portal-url resourceref=" id.com.welcome.page.new "/&amp;gt;&lt;br /&gt;&amp;lt;/url-mapping-context&amp;gt;&lt;br /&gt;5. Install theme and skin&lt;br /&gt;&amp;lt;request&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:noNamespaceSchemaLocation="PortalConfig_1.3.xsd"&lt;br /&gt;type="update"&lt;br /&gt;create-oids="true"&amp;gt;&lt;br /&gt;&amp;lt;portal action="locate"&amp;gt;&lt;br /&gt;&amp;lt;skin action="update" active="true" objectid="TestPortal"&lt;br /&gt;uniquename="ibm.portal.skin.TestPortal" resourceroot="TestPortal"&amp;gt;&lt;br /&gt;&amp;lt;localedata locale="en"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;TestPortal&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;TestPortal Skin&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;/localedata&amp;gt;&lt;br /&gt;&amp;lt;/skin&amp;gt;&lt;br /&gt;&amp;lt;skin action="update" active="true" objectid="NoSkin"&lt;br /&gt;uniquename="ibm.portal.skin.NoSkin" resourceroot="NoSkin"&amp;gt;&lt;br /&gt;&amp;lt;localedata locale="en"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;No Skin&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;NoSkin&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;/localedata&amp;gt;&lt;br /&gt;&amp;lt;/skin&amp;gt;&lt;br /&gt;&amp;lt;theme action="update" active="true" defaultskinref="TestPortal"&lt;br /&gt;uniquename="ibm.portal.theme.TestPortal" resourceroot="TestPortal"&amp;gt;&lt;br /&gt;&amp;lt;localedata locale="en"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;TestPortal&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;description&amp;gt;TestPortal Theme&amp;lt;/description&amp;gt;&lt;br /&gt;&amp;lt;/localedata&amp;gt;&lt;br /&gt;&amp;lt;/theme&amp;gt;&lt;br /&gt;&amp;lt;/portal&amp;gt;&lt;br /&gt;&amp;lt;/request&amp;gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1260189105340784848-4215090669170611495?l=techportals.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://techportals.blogspot.com/feeds/4215090669170611495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1260189105340784848&amp;postID=4215090669170611495&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4215090669170611495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1260189105340784848/posts/default/4215090669170611495'/><link rel='alternate' type='text/html' href='http://techportals.blogspot.com/2008/12/xml-access.html' title='XML Access Script - WebSphere Portal'/><author><name>TechPortal</name><uri>http://www.blogger.com/profile/10991004525567280268</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
