|
I have a ergent problem.
In my servlet I new a class to parse the xml file. But I found
that a unknown exception thrown at the sentence of new. it's ok when I test
the servlet using main(). I am very confused of it.
here is the code.
public void doPost(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException
{
xmlParser
xp=null;
response.setContentType("text/html"); out = new PrintWriter (response.getOutputStream()); try{ forlog=new
logFile("newsfeeds.log");
forlog.WriteLog(true,true,"doPost");
NewsType=request.getParameter
("feedname");
NewsURL=request.getParameter("xmldata"); forlog.WriteLog (logFile.INPUT_LOG,NewsType); forlog.WriteLog (logFile.INPUT_LOG,NewsURL); forlog.EndLog(); if(NewsType.equals("englishNews")) // THE PLACE EXCEPTIN THROWN xp=new xmlParser(xmlParser.NewsFeed,NewsURL); else if(NewsType.equals("englishGoalFlash")) xp=new xmlParser(xmlParser.MatchFeed,NewsURL); else if(NewsType.equals("englishMatchDetails")) xp=new xmlParser(xmlParser.MatchDetail,NewsURL); else postStr(true); sbis=new StringBufferInputStream(NewsURL); if((Node=xp.startParse (sbis))==null) postStr(false); } catch(Exception e) { forlog.WriteLog(e); } }
The class to parse the xml is below
public class xmlParser extends
DefaultHandler
{ public xmlParser(int Nodetype,String surl) { Nodetype=type; } .......
I have no idea what happened. Someone can help
me?
thank you very much. I am anxiously waiting for your
suggestion.
|
- Re: How to Cache the resultset??? Claude HONNORE
- need help Ramesh, Kesav
- Re: need help G S Sundar
- Need help Rajeshwar Rao Vadheraju
- Re: Need help G S Sundar
- Re: Need help Christopher K. St. John
- Re: Need help Robert Koberg
- Re: Need help Oscar P�rez
- Re: Need help Lindsay, William (BIS)
- Re: Need help Lindsay, William (BIS)
- Re: need help 柳建全
- Re: need help Bo Xu
- Re: Unkown Exception parsing XML file (was: ... Richard Yee
- Re: need help Pizer.Chen--Iceant
- need help Nandish Angadi
- Re: need help anoop
- Re: need help Drozd Mark
- need help [Qing LI]
