Did you know? New things I learned about Servlets

I learnt few new things about Servlets recently
1. SingleThreadModel has been deprecated since 2.4 specification
2. Servlet’s init method should throw UnavailableException if it cannot complete its initialization
Smart and funny ways to save money during recession

Loading Files using Java in a location independent way

Location independent access to Java Resources is a nice tutorial if you would like to know how to load files in java without specifying absolute paths. In a nutshell its done by using methods getResource and getResourceAsStream method in class Class. There is another set of methods in ClassLoader for loading system resources.
Smart and funny [...]

Eclipse hangs with a blank screen on start up

I ran into a problem where the Eclipse just hangs and shows a blank screen on start up. On analysis I found that its due to the perspective that its trying to open with. I could not find the problem thats causing this but I wanted to open the project and do some work on [...]

SAX based approach to build/create XML documents

If you dont want to build a xml document using StringBuffer or DOM then you can look at doing it with SAX. A  sample code that does this and passes the document to a byte array stream is as follows
SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
TransformerHandler handler=factory.newTransformerHandler();
Transformer transformer = handler.getTransformer();
//set the stream
ByteArrayOutputStream bos = new ByteArrayOutputStream();
StreamResult streamResult [...]

Jboss Seam problem with Pages.xml – Does not recognize Page actions

I had a strange problem where Seam (used 2.1.0) did not recognize the page actions specified in the pages.xml which was placed under WEB-INF. I searched around and found no one had such a problem and of course the problem was finally in the way I was declaring the view id. View id needs to [...]

Jerry Yang, Yahoo CEO, finally takes a bow! Does it open the door to Microsoft?

So finally the inevitable happens. Jerry Yang, who founded Yahoo and who is currently its CEO, decides to quit from the top post. Its more or less expected after he and the rest of the Yahoo board rejected Microsoft Offer. You cannot blame this guy for the stock hammering that took place in recent times, [...]

Comments with Facelets

Looking for a date or love? Click here to find one for free!!
Find Singapore Apartment  and Room Rentals here
India Stock Market blog
If you are using xhtml for facelets then you might have come across cases where the xml comments
( <!– xxx –>) does not really prevent the jsf tags from being interpreted. These cause [...]

Using Java Reflection to invoke a method with Array Parameters

Looking for a date or love? Click here to find one for free!!
Find Singapore Apartment  and Room Rentals here
India Stock Market blog
Invoking a method that accepts array parameters using java reflection is a little bit tricky. The following code shows how to do it the right way and the possible errors you may see [...]

Eclipse Error:- Timeout waiting for JBOSS 5.0 to start. Server did not start after 50s

Smart and funny ways to save money during recession
Do you see the error (Timeout waiting for JBOSS 5.0 to start. Server did not start after 50s) while trying to start up the JBoss 5.0 server with Eclipse server plugin? Then do the following
go to Window -> Preferences -> Servers and set the time [...]

Using Hibernate JPA with Weblogic 10

Looking for a date or love? Click here to find one for free!!
Find Singapore Apartment  and Room Rentals here
If you are looking to use Hibernate JPA with Weblogic 10 then there are a couple of things to keep in mind
1. OpenJPA is the default JPA provider in weblogic so if you don’t get the [...]