Author Archives: yogesh249

Real time examples of Design patterns being used by Java

I am very keen to learn what all design patterns are being used by java code. So here I am going to list them one by one.. I’ll keep on updating this article as and when I learn more about … Continue reading

Posted in Best Practices, Design Pattern, Java | Tagged , | Leave a comment

The water jug problem

We have three water jugs, and each can hold 3oz., 5oz., and 8oz. of water, respectively. Without the possibility of water spilling when poured from one jug to another, and given that the jugs have no calibration, how do we … Continue reading

Posted in Interview Puzzles, Interview Questions | Tagged , , | 1 Comment

Problem using c:set of jstl

The problem was that i was not able to set the value of a variable defined in a scriptlet. Root cause: The tag lib i was using was perhaps of an older version. Older version: Newer version: Please do post … Continue reading

Posted in J2EE, Java, JSP, Server Side Programming | Tagged , , , | 1 Comment

How to log SOAP Request and response XML in log file

Thanks to http://www.coderanch.com/t/549539/Web-Services/java/Convert-SOAP-response-SOAP-XmL http://qa.netbeans.org/modules/j2ee/promo-g/end2end/hello_ws.html It is mostly desired to log the SOAP request and response XML into log file. But there is no direct way, using which you can log the XML, because the XML generation part is in the … Continue reading

Posted in Server Side Programming | 11 Comments

How to make my browser trust my server certificate?

Hi Guys, I was exploring the SSL thing, and wanted to know what are the steps involved in making my browser trust the server certificate that server is sending. First of all you need to generate a keystore (This needs … Continue reading

Posted in Browsers, Client Side Programming, Java, Server Side Programming | Tagged , , | Leave a comment

Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

I was getting the following error in the logs of the tomcat, when I try to start the tomcat server. Error occurred during initialization of VMjava/lang/NoClassDefFoundError: java/lang/Object Things I tried but didn’t work=========================1) I used class finder to find that … Continue reading

Posted in J2EE, Java, Server Side Programming | Tagged , , | 1 Comment

How to configure Tomcat to support SSL or https

Thanks to http://www.mkyong.com/tomcat/how-to-configure-tomcat-to-support-ssl-or-https/ 1. Generate Keystore First, uses “keytool” command to create a self-signed certificate. During the keystore creation process, you need to assign a password and fill in the certificate‚Äôs detail. $Tomcat\bin>keytool -genkey -alias mkyong -keyalg RSA -keystore c:\mkyongkeystoreEnter … Continue reading

Posted in Server Side Programming | Tagged , , | Leave a comment