Author Archives:

CRSF token and spring

http://seamframework.org/Documentation/CrossSiteScripting <h:outputText value=”#{param.name}” escape=”false”/> <!– DON’T DO THIS! XSS SECURITY HOLE! –> but do this: <h:outputText value=”#{myBean.myTextContent}” escape=”false”/> <!– Content contains &entity; and is already safe! –>

Junit fork=”yes” dir=”${some.dir}” sets the working dir to ${some.dir} which ignores classpath specified in the test

Junit tests failed when executed by ant but they were successful when I executed them from eclipse. Reason was the dir parameter in junit ant task. It was specifying the the folder which should act as the root folder and this somehow was blocking the classpath specified. and I was looking for a file in [...]

Overcome TestDirector and IE7 incompatibility

Use TD explorer instead of IE 7. acts as a client side application. can be downloaded at http://updates.merc-int.com/testdirector/td80/others/tdexplorer/index.html

Working with Zip file in java

Following are the code snippets to retrieve a zip file from the inputstream(which can obtained from FileItem) and retrieve a file named file.txt from the zip file. Retrieving a zipfile from inputstream private ZipFile getZipFileFromStream(InputStream inputStream, String inputFileName) throws IOException { BufferedOutputStream outputStream = null; ZipFile zipFile = null; byte[] buffer = new byte[1024]; int [...]

Ajax: A New Approach to Web Applications

by Jesse James Garrett  February 18, 2005  If anything about current interaction design can be called “glamorous,” it’s creating Web applications. After all, when was the last time you heard someone rave about the interaction design of a product that wasn’t on the Web? (Okay, besides the iPod.) All the cool, innovative new projects are [...]

Follow

Get every new post delivered to your Inbox.