Are u sure that the NewsType is not null?
>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.
��칻�&ޱ��zf���%��lz��j���w(��݊w%�ע��^n�r��azg����('���K2
LDDI0+r�z�m���j�!�����ڲ�ܢoڭ�b��?����b�׫z�a�iQz�.�Ǭ��i��ڽ�.��&���v�-����^������jZ޲��q�!�iK!$�GzZa���
0����&�f���l�����z�m�

Reply via email to