How can i convert Pdf to doc using java api's.Ot can i have some good api which can be used to create word docs in java.I have used iText's RtfWriter2.but it creates a rtf file which although is viewable in word but has a huge size compared to *.doc documents.Apache POI i suppose is not efficient to add stuff like pagenumbers and TableOfContents
Can someone explain me in regex a . (dot) is considered a metacharacter without preceding \\ but.(d->digit,s->space,w->word character) are considered metacharacter by putting preceding \\ i.e \\d \\w \\s
split function splits the string into tokens which it identifies by expression given as parameter to split (in your case ,).The whole string as a single token still remains even if there is no separating char in it.
public class Test { public static void append(List list) { list.add(42); } public static void main(String args[]) { List<String> intList = new ArrayList<String>(); intList.add("Hello"); append(intList); System.out.println(intList.get(1));//line 11 }
}
I get A class cast exception in line 11
but if reverse the situation by
->having intList of Generic Type Integer ->adding integer to it before calling append ->adding string to list inside append
then i get a valid output Here is the reversed code that works.I want to know the explanation for it
//code with reversed situations
public class Test { public static void append(List list) { list.add("Hello"); } public static void main(String args[]) { List<Integer> intList = new ArrayList<Integer>(); intList.add(10); append(intList); System.out.println(intList.get(1)); }
What other alternative do i have for the following situation:
on file1.jsp
i have a button with caption download file
on the click of the button request is submitted to downloadfile.java servlet
downloadfile.java servlet sends doc file to browser by opening separate (open ,save as) dialog box
during this event my file1.jsp is visible in its own window on client side while client gets an (open saveAs) popup dialog for doc file.
i want my downloadfile.java servlet to send the download file to servlet (which it is doing perfectally well) and also refresh the file1.jsp which i cannot do because servlet cannot send two responses?
I want to send a file to browser and then want to send control to another jsp. i am sending a file to browser through following command which is opening in a new window.after that i want to forward the page to a jsp how can i do it