Archive for 2008

Struts Internationalization (I18N)

Problem Statement: We require to achieve internationalization using Struts 1.xWe have a layout setup for our application as header footer and content and few other tiles.. There is a select box in the header JSP wherein the user is allowed to select a locale – English, or Spanish Based on the selection, the labels/data in the content tile should change to the corresponding locale. Ie., the labels in the ...

UnsupportedOperationException while removing or adding elements from List

Problem statement: While running following code, UnsupportedOperationException is thrown both at .add() and .remove() method. What is the problem with the code?List myNewList = Array.asList(someArrayOfLong); myNewList.add(new Long(15)); //add an element in the list. myNewList.remove(0); //remove element from the list at index 0.Solution: By the time you get to the remove(i) statement, list is no longer a java.util.ArrayList. When you call Arrays.asList it does not return a java.util.ArrayList. It returns ...
Tags:

Conversion of text file in PDF and vice versa in UNIX

Yes, this is also a good solution. All you need is to add:\documentclass{article} \begin{document} .... your original text goes here ... \end{document}after that call pdflatex youFIle.tex in your shell script.
Tags: ,

Ajax Style File Uploading using Hidden iFrame

File uploading using AJAX is not possible. AJAX doesn't actually post forms to the server, it sends selected data to the server in the form of a POST or GET request. As javascript is not capable of grabbing the file from the users machine and sending it to the server, it's just not possible with AJAX. You have to resort to regular old form submit.If ...

Installing Windows XP with Vista

I assume Vista is preinstalled. And you want to install XP along with Vista. Now as Vista is preinstalled most probably there is only one partition. So you need to create a new partition to install XP.To create a new partition in Vista from unused space without any other software: Boot vista , type Ctrl+R and enter diskmgmt.msc. Better to defragment the drive before this. Right click ...
Page 5 of 512345