Thursday, December 11, 2014

Why my JSF navigation failed - for beginners in JSF

JSF navigation did not work for me with the following content

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html  xmlns=""   
      from page2.xhtml
      <h:commandButton action="home" value="go to home" />

Caused a standstill since it did not emit any error in logs.

Since <h:commandButton> produces the html <input type='submit' />, it is supposed to be inside a form. So made the correction and it worked.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html  xmlns=""   
      from page2.xhtml
      <h:commandButton action="home" value="go to home" />

Thursday, December 4, 2014

An excellent article which explains the basics of configuring a JSF application without using any IDE

If you know JSP and are looking for some help to get started on the basics of JSF without using any IDE or build tool (most tutorials use maven, but for those who have no maven knowledge, many things remain hidden), here is yours :

Once you complete your JSF setup using the above link, then you can use to explore further.

Friday, June 13, 2014

[SOLVED] Exception while configuring tiles in Struts 1

Got the following exception while configuring tiles with Struts 1.3.10.

INFO: Loading chain catalog from jar:file:/C:/work/eclipseworkspace/pas/1/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/pas/WEB-INF/lib/struts-tiles-1.3.10.jar!/org/apache/struts/tiles/chain-config.xmlJun 13, 2014 10:55:12 PM org.apache.commons.digester.Digester errorSEVERE: Parse Error at line 8 column 77: Document root element "definition", must match DOCTYPE root "tiles-definitions".org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 77; Document root element "definition", must match DOCTYPE root "tiles-definitions". at at at at at at at at at at$NSContentDriver.scanRootElementHook( at$ at$ at at at at at at at at$JAXPSAXParser.parse( at org.apache.commons.digester.Digester.parse( at org.apache.struts.tiles.xmlDefinition.XmlParser.parse( at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFile( at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.parseXmlFiles( at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.createDefaultFactory( at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory( at org.apache.struts.tiles.xmlDefinition.I18nFactorySet.initFactory( at org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.init( at org.apache.struts.tiles.TilesUtilImpl.createDefinitionsFactory( at org.apache.struts.tiles.TilesUtil.createDefinitionsFactory( at org.apache.struts.tiles.TilesPlugin.initDefinitionsFactory( at org.apache.struts.tiles.TilesPlugin.init( at org.apache.struts.action.ActionServlet.initModulePlugIns( at org.apache.struts.action.ActionServlet.init( at javax.servlet.GenericServlet.init( at org.apache.catalina.core.StandardWrapper.initServlet( at org.apache.catalina.core.StandardWrapper.loadServlet( at org.apache.catalina.core.StandardWrapper.load( at org.apache.catalina.core.StandardContext.loadOnStartup( at org.apache.catalina.core.StandardContext.startInternal( at org.apache.catalina.util.LifecycleBase.start( at org.apache.catalina.core.ContainerBase$ at org.apache.catalina.core.ContainerBase$ at java.util.concurrent.FutureTask$Sync.innerRun( at at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at

The problem was : I did not enclose my 'definition' tag in my tiles-defs.xml with the , since i referred Struts Examples page (I'd call it a poor documentation, poor availability too, some pages are missing at this point of time).

Find below the correct tiles-defs.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 1.3//EN"
<tiles-definitions> <!-- THIS TAG WAS MISSING -->
<definition name="default-template" path="/common/tiles/default-layout.jsp">
  <put name="header"  value="/common/Header.jsp" type="string" />
  <put name="menu" value="/common/Menu.jsp" type="page" />
  <!-- put name="body"   value="/index.jsp" type="page"  -->

Tuesday, May 21, 2013

Error running javac.exe compiler - ant compilation error

I am using windows 7 and had installed java under C:\Program Files (x86)

May be the space or the special chars in the path should have created problem with ant

Just copied the java folder from C:\Program Files (x86)\ to D: and set my JAVA_HOME to D:\java\jdk1.6.0_11 and added the path D:\java\jdk1.6.0_11\bin to my system path. Ant compiled my code!

Sunday, February 10, 2013

Devices list not appearing on itunes on your computer

Just plug out your usb connector interface and plug-in again

Monday, January 21, 2013

tree command with file listing

tree /f

Saturday, September 15, 2012

Firebird query to list out rows having duplicate values in columns


This query will list out only the rows from TABLE1 which have duplicate values in COLUMN1.