Thursday, July 24, 2008

Moving to Roller

As Apache Roller gives me more option in formatting code, I will start blogging at http://www.theasolutions.com/roller/karthik/

Tuesday, July 15, 2008

How to export Maven project details to NetBeans

To export a Maven project details to NetBeans understandable format, please use the command below.
mvn netbeans-freeform:generate-netbeans-project

Then in NetBeans point to the root folder of the product [Say File--> Open Project] in NetBeans

Wednesday, July 9, 2008

How to use Eclipse Shortcut keys in NetBeans 6.1

To use Eclipse Shortcut keys in NetBeans 6.1 please go to Tools--> Options--> Select KeyMap tab and in the profile drop down select Eclipse.

Tuesday, July 8, 2008

"Internet Explorer Cannot Download" Error Message When You Use HTTPS URL

Internet Explorer will not display attachments when HTTPS is used. This bug has been documented in the link below.

http://support.microsoft.com/kb/812935/

If the development environment is not using HTTPS this issue will be identified only at a later stage when we move on to integration testing environment where we normally use HTTPS.

The following are the steps to be followed for the workaround.

1. In the Servlet code please use the below snippet.
response.reset();
//If the report type is other than PDF handle accordingly]
response.setContentType("application/pdf");
response.setHeader("Content-Disposition","attachment; filename=Report.pdf");
response.setHeader("Pragma", "public");
response.setHeader("Cache-control", "max-age=30");

//The logic to write into the OutputStream goes here.

Note: The reset of HttpServletResponse is very important.

2. Ensure Do not save encrypted pages to disk check box is not selected in Internet Explorer.

3. Incase of IE 7, ensure the automatic prompting for downloads is enabled under Tools-->Internet Options-->Custom Level --> Downloads.

Note: You would have configured HTTPS using the following in web.xml in Tomcat using security-constraint

Monday, July 7, 2008

Maven eclipse plugin not found error

Error: The plugin 'org.apache.maven.plugins:maven-eclipse-plugin' does not exist or no valid version could be found

If you get this error, please go to Maven local repository [ In my case C:\Documents and Settings\karthikeyanc\.m2] and navigate to org.apache.maven.plugins.
Delete the folder maven-eclipse-plugin from C:\Documents and Settings\karthikeyanc\.m2\org\apache\maven\plugins folder.

Now run commands like mvn eclipse:eclipse or mvn eclipse:clean and the commands will get executed without the above error.

Labels: ,

Sunday, July 6, 2008

First Post - Unraveling Java Terminology

Decided the first post will be for budding Java developers. The below link provides links to know more about Java terminologies.

http://java.sun.com/new2java/programming/learn/unravelingjava.html