Skip to main content

Posts

Chandigarh Java User Group

Its a long time I have written about any new things in Java. But few days back I had started working on starting a JUG in my local city Chandigarh. I had seen people in Chandigarh specially freshers not able to grasp a good knowledge of the Java and related technologies. They even don't know about the latest technologies and what is happening in the world of Java. So I finally thought of starting a JUG namely Chandigarh Java User Group. I want to organize a JUG meet as soon as possible in the city. So anyone can join and start working on that side. I am very much influenced by @HarshakOak who is a Java Champion and organizes many Java events like the indicThreads. I had gone to attend those meetups some time. There you will get a lot of knowledge about what is happening around the world in the field of Java Some of you wanted know about the procedure of joining the JUG. its pretty simple. Join java.net and then go to Chandigarh Java User Group and join it. There is also a

How to handle autocomplete in browsers

Sometimes we face a problem while opening forms. There are some fields in the form that are always pre-filled whenever that form is opened. This is because of the auto-fill feature of the browser. To solve that simple put the autocomplete="off" in form tag like below: <form name="frmUser" method="post" action="test" autocomplete="off"> Name : <input type="text" name="name" /> </form> According to the mozilla https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion  this happens because we are using the the two fileds in our form i.e. NAME and ADDRESS.  Like in the above form we have used the label Name . To resolve this issue we can do the following: Simply include the name using span as below <form name="frmUser" method="post" action="test" autocomplete="off"> < Name : <input type="text" name="abc"

IndicThreads Java Conference 2010

This is my second consecutive Java conference from IndicThreads. Here are some of the topics and the speakers who had share their valuable information. The conference is great and I recommend all to visit it once and see the difference Harshad Oak Harshad is the man of few words. He is the organizer and owner of the indicthreads conference. He is the Java Champion and Oracle Ace. He started conference with the topic Java: Riding the Change where he discusses the changing the nature of the Java. What is around the corner and what Java guys need to be in mind in the coming time. He discusses the language changes and the Oracle view on the Java. He had given his experienced thought on the many of the scripting languages like groovy, jython etc. He clarifies that the place of Java is more superior to any of the other languages. Java superiority will be continued. He had also told about the 5 - 95 rule which says that 5% of the people think java will be lost in the near future an

Struts 2 - result type input error Resolved

Some times when coding through Struts 2 we get a input error specifying that result type input missing. But we haven't applied any validation on it. That some times creates a havoc among developers and they start complaining about the error as Struts 2 doesn't give the proper error. Struts 2 in Action I was also facing the same problem until I found the hole in my coding. As we all know that input type result is required when validate framework is applied. This is obvious as it will return to the input page defined in the input type result if some validation fails. But when we haven't applied any validation and this error is displayed what can be the problem. The problem can be: You have created a field on the jsp let it be hidden field and you are implementing the ModelDriven interface. But you forgot to add the jsp hidden field variable in the pojo class . This will surely generate this error. The solution to this problem is to declare a variable in the pojo

Unclean shutdown of previous Apache run - Resolved

Today I am having a problem with Apache restart. It is continuously giving me the Unclean shutdown of previous Apache run error. After googling for two hours I got a answer to it. Actually I had installed a Skype on my system which uses port 80 for its some connection purpose and Apache also uses it. So simple un-check the Use port 80 option in the Advanced -- Connection tab from Skype options. Then restart the apache it works well. Hope it works for you as well. What a stupid mistake.

Getting height and width of image in Java

Yesterday I was working on something that requires manipulation of image for getting its properties. After searching over the internet I found a very intersting class on Java i.e ImageIO and BufferedImage class. These classes are good enough to manipulate images. there are many other claases also. But what I need i got it from these. I found many developers searching over internet for getting properties of image and there is no good small example for that. Thats why I thought why not creating a simple code to manipulate the image and help the developers. Here is the small code that helps to get the height and width of the image. Enjoy it!! import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public class GetImage { public static void main(String[] args) { try { File f = new File("E:/Vinod/Docs/Pics/krishna_01.jpg"); BufferedImage image = ImageIO.read(f); int height = image.getHeight(); in

IndicThreads Java Conference - What a Experience

Its a very good experience of attending the IndicThreads Java Conference in Pune. Its very exciting to listening to the gurus of the Java and other latest technologies. I have learned a lot from the technology gurus specially from the Arun Gupta from the Sun Microsystems. It is my first ever experience of attending any Java conference. IBM developerWorks is a Gold Sponsor for the event. The event is occurred in a beautiful hotel Orbett. Harshad Oak - The very first Java Champion from India; I am very delited after meeting him. He is very nice guy and he is also the organizer of the event. I had asked him questions about how he had become the Java Champion . I asked him the procedure for the same. He had told me in the straight forward way that it is a very simple as you have to do something very special in the field of Java. I think he had done something good in the files of Java as he has been nominated by the community members of the Java. He might have done something