Skip to content

Tag: java

Changing value of <c:set jstl tag

I am using the following expression on my jsp I have a condition inside a for each loop where I might want to change this variable to true. Is there a way to do this. I’ve looked everywhere but unable to find a solution. Answer Here is the sample code you are looking for:

Finding a file in zipentry java

I am trying to find a file within a zip file and get it as an InputStream. So this is what I am doing to get it so far and I am not certain if I am doing it correctly. Here is a sample as the original is slightly longer but this is the main component… Now the main problem

How to convert “Mon Jun 18 00:00:00 IST 2012” to 18/06/2012?

I have a value like the following Mon Jun 18 00:00:00 IST 2012 and I want to convert this to 18/06/2012 How to convert this? I tried this method but it throws following exception : java.text.ParseException: Unparseable date: “Mon Jun 18 00:00:00 IST 2012” Answer I hope following program will solve…

Draw an ERD from Hibernate Mapping Files

I know it’s possible to reverse engineer from the database into mapping files but does anyone know if it’s possible to get hibernate to draw an ERD based on its own mapping files so that I can compare Hibernate’s ERD with the Databases one? Answer I achieved this by using: in my hibernate.cf…