Skip to main content

Posts

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 ...

IndicThreads.com Conference On Java

IndicThreads.com Conference On Java is going to held on 11th and 12th Dec '09 at Pune, India. This is very intersting event especially for java passioniors and lovers. You can join the conference by visiting the website http://j09.indicthreads.com/ or clicking on the logo on the right side of this page displaying the event like this. I hope you will enjoy the event and the future of java and many other intersting technologies. I love to be there.

Weblogic Portal Example

Here I am going to make a simple example of Weblogic Portal. Minimum requirements: Weblogic Portals Weblogic Workshop Weblogic Server Basically when you download weblogic portals then you will have all the necessary things already installed. It can be downloaded from http://www.oracle.com/technology/software/products/ias/bea_main.html You have to download Oracle WebLogic Portal 10.3 . Step 1: Setting up the Weblogic Workshop  Open Weblogic Workshop from Programs -> Oracle Weblogic -> Workshop for Weblogic . Change the perspective to Portal i.e. Window -> Open Perspective -> Others -> Portal . Step 2: Create sample application Create new Portal EAR project from File -> New -> Portal EAR Project . Name it sampleEAR. Click next and proceeds with default setting. Create new PortalWEB project from File -> New -> Portal Web Project . Name it sampleWEB. Associate it with sampleEAR by clicking on checkbox if it is not selected and proceeds without any...