Archive for the ‘java’ Category

Java programming interview questions – New list

Posted on January 27th, 2012 by admin  |  No Comments »

I am trying to put here some less discussed interview questions on java, as recruiters have become intelligent and changed their question patterns little different. Questioned asked during interview for a 2 years of experienced person compared to 4+ varies greately, in former people check mostly knowledge of oops and ability of do basic programming , but in case of more experienced programmers they can ask intricate details of java programming and questions related to frameworks. Read the rest of this entry »

Java Struts and Cakephp framework the Difference

Posted on January 19th, 2012 by admin  |  No Comments »

This article is designed to throw some comparison between Struts2.x  and cakephp 1.3.x framework, this will also apply for other version of these framework to a great extent, this can be helpful to a cakephp framework developers  to make shift to java struts or vice versa. Difference listed here I resting on what I know please feel free to post a comments.

Both are popular MVC framework and used for different situations a programmer coming from one background will scratch his head trying to figure out why this MVC not doing the work that MVC while there is plenty of architectural difference between two, here i am going to compare them but these points do not conclude anything that one framework is better than other.

1. Configuration -> In struts you will need to define configuration files in the form of web.xml, struts.xml, tiles.xml or hibernate.cfg.xml in case you are using hibernate ORM, in cakephp minimal or no such configuration is required Cakephp has its built on ORM packaged along with main framework. Read the rest of this entry »

Eclipse not building class files – Servlet not found

Posted on December 18th, 2011 by admin  |  No Comments »

I was developing a web application, deployed and run from inside eclipse embedded tomcat server. Few days back when I  accessed this project I found that project is not running and throwing some ClassNotFound exception that system could not find servlet class. I verified everything like servlet class was in place and web.xml file had correct entries.

I wasted lot of time trying to find over Google why server container is not loading my servlet, nothing I found useful then suddenly this thing popped into my mind that maybe my .class files are not found or not being generated after clean build. And yes when i peeked into “WebContent/build/classes” files nothing was there, so that was the source of all evil.

Why eclipse is not building class files ? “Build automatically” was checked. I search a lot here is one  thread where peoples have tried all possible tactics https://forums.oracle.com/forums/thread.jspa?threadID=1518457

But  this also didnt helped me, but now I am perfectly able to compiled it and run my project here is how

eclipse build class file looking into problems

Besides Console view there will be “Marker” or “Problems” window that logs flagged issues for the project.Iif there are any error eclipse will not compile the project, you will need to first resolve those flags

Every time you make any change in project do Right click on project -> Refresh and marker window will update itself, if  major errors are gone you will be now able to do Auto build when running the app.