Converts the byte array stored in the database to Image file (swt image) in Java

February 5, 2011

Creating an SWT Image from byte array in Java

Assuming “imageByte” as the byte array in the database

BufferedInputStream inputStreamReader = new BufferedInputStream(new ByteArrayInputStream(imageByte));
ImageData imageData = new ImageData(inputStreamReader);
Image byteImage = new Image(getDisplay(), imageData );

“byteImage” object is the SWT image generated from byte array


WARNING: No configuration found for the specified action: ‘ ‘ in namespace: ‘ ‘. Form action defaulting to ‘action’ attribute’s literal value

February 2, 2011

Tips:- Look at the namespace tag and the namespace add by you

Steps to resolve this warning

Step 1 ) In the default namespace added in struts.xml file, append a “/” followed by the namespace name

for the “namespace” attribute of the “package” tag “
eg:- package tag attributes :- name=”test” namespace=”/test” extends=”struts-default”

Step 2 ) In the jsp file, append a “/” followed by the namespace name

for the “namespace” attribute of “form” tag”
form tag attributes :- action=”TestAction” namespace=”/test”

Generating “Stubs” from WSDL and Axis tool.

December 6, 2010

Step 1: Install Java and its environment setup.

Step 2: Axis tool and its environment setup.
[Axis Environment set up: – variable name: AXIS2_HOME & variable value: …\xxx\ axis2-1.5.1]

Step 3: Use “wsdl2java.bat” for windows and “” for Linux.
In the command line to generate Java code (client stub) according to a given WSDL file.

Step 4: Usage of “wsdl2java”. wsdl2java.{sh|bat} [OPTION]… -uri

Example in windows:
wsdl2java.bat –uri –o C:\Documents

Step 5: Stub will be inside “C:\Documents” folder.

Reference: –