Re: Servlet can't communicate with 'Database made using XML' !

From: Christophe Vanfleteren (c.v4nfl3t3r3n_at_pandora.be)
Date: 01/26/04


Date: Mon, 26 Jan 2004 10:14:25 GMT

Abhishek Agrawal wrote:

> Iam making an application in which the user logs in by entering
> username and password through a Servlet ,
>
> Usernames and passwords are already stored in an XML document on the
> server , the Servlet has to just parse the XML document and verify the
> username and password
>
> iam using 'Apache Tomcat 4.1.12' and 'JAXP api for XML' processing
>
> THE PROBLEM IS THAT WHILE RUNNING THE SERVLET IT IS THROWING
> EXCEPTIONS(NULL POINTER EXCEPTION) THAT IT WAS UNABLE TO PARSE THE XML
> FILE !
> IT ALSO GIVES 'http-ERROR 500'
>
> PLEASE IF ANY ONE CAN HELP>>>>>>>>>

Please don't use all caps. It makes you look rude.

Anyway, you'll need to show us your code + xml file, otherwise noone here
will be able to tell what you're doing wrong.

Have you tried parsing the xml file in an ordinary class? If you can get it
to work there, then you might try in a servlet. This method will be faster
to try/debug.

-- 
Kind regards,
Christophe Vanfleteren


Relevant Pages

  • ANN: xmltask 1.9
    ... Version 1.9 of xmltask is out now. ... This version allows calling of ant ... will call the 'servlet' target for each servlet definition in web.xml, ... This facility can be used to drive builds from XML deployment ...
    (comp.lang.java.programmer)
  • Re: AJAX
    ... DOM-API, gegen XML? ... >> und bindet dein Servlet hart an das HTML-Dokument. ... ob es Javascript oder XML erzeugt? ... Ja, dann wird das mit dem AJAX irrwitzig, wenn du doch immer die ganze Seite ...
    (de.comp.lang.java)
  • Re: Tomcat: POST from one servlet or internal class to another servlet
    ... an internal class of one of the servlet generates some XML, ... > XML then needs to be HTTP POST'ed to another servlet for processing on the ...
    (comp.lang.java.programmer)
  • Re: Servlet To Java Application Communication
    ... I would like to write a Java servlet that it will be able to ... > way to communicate with a servlet. ... > probably know you should encode the request XML in the body part of a POST ... > and expect the response XML in the response content. ...
    (comp.lang.java.databases)
  • RE: XML documentation file name
    ... MSDN document on VB.NET Project Designer says "The Generate XML document ... XML documentation is automatically emitted into an XML ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.languages.vb)