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 errors most of the times. So to let Facelet know that it should not consider the comments use the following configuration in web.xml

<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>

Posted in Technology | Tagged , | 2 Comments

Singapore Discount Sale : OG has 20% discount storewide

Smart and funny ways to save money during recession

We all know there are always great discounts going on in the city of Singapore. One of them is at OG at somerset. OG is now running a  20% discount in its store and its annual membership card is also being offered if you spend more than 75 SGDs. I have been visiting this store recently and think a membership will be useful as it gives 10% dsicount on items. Of you are interested then check this place, membership is open till oct 1st 2008.

Posted in Uncategorized | Tagged , , | Leave a comment

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 if you get it wrong.

–Class with a method that accepts an array —

public class Dao {

public void Method2(String[] params){

//do something

}

}

— Test Class With CORRECT CODE–

public class Test {

public static void main(String[] args) throws Exception{
Class classToCall = Class.forName(“Dao”);
String[] argu ={“1″,”2”};
Method methodToExecute = classToCall.getDeclaredMethod(“Method2”, new Class[]{String[].class});
methodToExecute.invoke(classToCall.newInstance(), new Object[]{argu});

}

}

— Test Class WITH CODE that gives java.lang.IllegalArgumentException: wrong number of arguments

public class Test {

public static void main(String[] args) throws Exception{
Class classToCall = Class.forName(“Dao”);
String[] argu ={“1″,”2”};
Method methodToExecute = classToCall.getDeclaredMethod(“Method2”, new Class[]{String[].class});
methodToExecute.invoke(classToCall.newInstance(), argu);

}

}

— Test Class WITH CODE that gives java.lang.IllegalArgumentException: argument type mismatch

public class Test {

public static void main(String[] args) throws Exception{
Class classToCall = Class.forName(“Dao”);
String[] argu ={“1”};
Method methodToExecute = classToCall.getDeclaredMethod(“Method2”, new Class[]{String[].class});
methodToExecute.invoke(classToCall.newInstance(), argu);

}

}

Posted in Technology | Tagged , | 20 Comments

Problem with FacesMessages using Seam 2.1.0 beta1?

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 dont see the messages added to FacesMessages context variable appear after upgrading to seam 2.1.0 beta1 then dont worry just check out this page at
http://www.seamframework.org/Community/InSeam210BETA1FacesMessagesinstanceaddstrConnotWorking#comment39173

Posted in yourmitra | Tagged | Leave a comment

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 out property to “Long” from default value


Posted in Technology | Tagged , | 13 Comments

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 configuration right then you should be seeing errors related to Open JPA

2. Even if you have hibernate jars within your EAR or WAR you may see them work. Again, this relates to point 1. So you have to tell weblogic to make use of Hibernate jars. One way to do it is to place the hibernate and its related jars under the server lib folder so that these jars are loaded upfront. There is another way where you use the deployment descriptor to indicate that weblogic should prefer the jars deployed with the application.

Posted in Technology | Tagged , , | Leave a comment

Fidel Castro bedded 35000 women over 40 years!!!

Looking for a date or love? Click here to find one for free!!

Find Singapore Apartment  and Room Rentals here

Fidel Castro is one horny bastard, according to a news report he has slept with 35000 women so far!! How was he able to do it twice every day for 40 years? Amazing!! right? Maybe You and I can as well if its a new lady every time. I guess he need not have to impress the women with his seduction skills. It should have been the other way round, women trying to impress him with their skills. Really, What a lucky bastard he is!!!

News Report:-

Cuban revolutionary leader Fidel Castro has slept with 35,000 women in his 82 years of life, according to an upcoming documentary.

“He slept with at least two women a day for more than four decades – one for lunch and one for supper,” the New York Post quoted an ex-Castro official named “Ramon” as telling filmmaker Ian Halperin.

“Sometimes he even ordered one for breakfast,” the official said.

“I don’t think he would have stayed on as long as he did if not for all the incredible women he had access to as president,” the official added.

Posted in Uncategorized | Tagged , | Leave a comment