Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
How do I go about.New to xml.Using Xerces parser.Plz help.Thanx in advance.
You need to implement the servlet's doPost(...) method for handling a HTTP POST request, locate the file based on the filename returned by HttpServletRequest#getParameter("xmlfile"), and parse the file using either the SAX or DOM API. IBM DeveloperWorks has a tutorial for validating against a schema using Xerces (see the link above).Write a Servlet using Java 1.3.x (but NOT Java 1.4) to read an xml file from the virtual directory /test and validate it as follows:
- The Servlet should be called TestParser
- the filename is passed in the parameter xmlfile using the post method
e.g xmlfile will have a value of file1.xml
- the file must be validated against the XML Schema –
...any validation errors should be EMAILED from the server to the account abd@rediff.net, the from address should be abc@rediff.net, the subject should be “XML Parser Error in File: “+filename
- The body should contain details of the error, including the line at which the error occurred and the XML file that failed to validate should be attached to the email.
This part is really about JDBC so you should post it separately to our JDBC forum.Write a Servlet using Java 1.3.x (but NOT Java 1.4) called DBTable to do the following: ...
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Its simple plain english.Lasse r u listening.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Let there be light.
doco
Is it appropriate to use "System.exit( 0 ) ; "?
Do you run the risk of shutting the server down?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
How do I pass the order using the argument??what will g[1] refer to??
when i run the program
java filename xmlfile ?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Now for legaladdress node I have to again do the same way as I did for tradingaddress.But then the schema will grow in size.Is there any other way out.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
You can download Apache James for free. Download, unpack, double-click run.bat...I dont have access to an smtp server.
I just gave you a list of the mistakes in the schema document you emailed me. Once you've fixed those, the schema should be fine.Schemas.Just check and let me know the errors.
The easiest way to do this would be to make the "iatanumber" field a primary key. Then, trying to insert a record with an existing iatanumber will throw an exception, which you can catch and append into the list of errors (which you will later add into the attachment).Insert parts where duplicates are not allowed
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I don't get it. What do you mean by "retrieving the table name"? Shouldn't you know the table name already? If this is something specific to MS Access then I'm afraid I can't help with that.Now when i do a String str=request.getParameter("tt") i will get the path.Now from this path i need to retrieve the table name.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I do execute the query rs.executeQuery("drop table agents") but get an exception that No resultset was produced.
Now I will have to keep a flag boolean value coz the next time I execute it should not drop this agents table.This is the correct way or any other way out.
But after re - running the program how will I get the total number of accepted and rejected records?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
What are you doing in my house? Get 'em tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|