Eldho George wrote:
FileReader fr=new FileReader(new File("General.xsl"));

The exact behaviour of opening a file with a relative pathname in a servlet depends on your servlet container. It is common that the pathname is resolved againts the CWD of the servlet container, which has nothing to do with the location of your servlet class files or whatever.


I also tried with

url="http://localhost:8080/HTML2PDFConverter";;
String f=url+"/General.xsl";

FileReader fr=new FileReader(new File(f));

You still try to open a file. Supplying an URL as a path name wont buy you anything, even if the URL would point to the content you expect (it doesn't)

How can i solve this problem?Any other solution is there...

Check ServletContext.getRealPath, HTTPServletRequest.getPathTranslated and similar functions. Detailed behaviour may depend on your servlet container.

Please ask this kind of basic questions in a more
appropriate forum. The user list for your servlet
contaier will probably point you to relevant
ressources.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to