Hi Friends,
I have problem with my servlet file that running
perfectly It giving output in server but I want output
on broswer.My servlet writing a xml file.For this what
should I add in my code .Can any one me the require
code.That means how I add out.println statement in my
code.Here is my code:-
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import com.megginson.sax.XMLWriter;
public class Writer extends HttpServlet
{
public void doGet(HttpServletRequest
req,HttpServletResponse res)
throws ServletException,IOException
{
res.setContentType("text/xml");
PrintWriter out = res.getWriter();
try{
XMLWriter w = new XMLWriter();
w.startDocument();
w.dataElement("greeting", "Hello,
world!");
w.endDocument();
}
catch(Exception e){}
}
}
Thanks in advance
Bikash
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html