Posted on May 18, 2007 by sharat
A document type definition (DTD) describes the permissible tags of an XML document. The DTD serves as a data template. It defines entities, elements, attributes, and notations, as well as the relationships between these. For example, the DTD can state that a memo element consists of To, From, Subject, and Message elements. You need to [...]
Filed under: XML | 1 Comment »
Posted on May 18, 2007 by sharat
Schemas are becoming more popular and DTDs less so. A schema is an XML-based syntax for describing how the XML document is marked up or how it looks – very similar to a DTD, but a DTD has a lot of drawbacks.A DTD doesn’t use anything like XML syntax to describe the definition. You can’t [...]
Filed under: XML | Leave a Comment »
Posted on May 18, 2007 by sharat
An XML namespace is a collection of element names or attribute names to be defined within an XML document.Let’s say you have an invoice XML document and an order XML document and you want to put them together. You usually have certain names that overlap each other – like the date. You might have an [...]
Filed under: XML | 2 Comments »
Posted on May 18, 2007 by sharat
XML is free form which means that you can configure it any way you want. It’s also very easy to read – you don’t have to read cryptic code to figure it out.It was designed specifically for internet protocols, and this makes it simple to transmit an XML document across, for example, a HTTP protocol.Strong [...]
Filed under: XML | 1 Comment »
Posted on May 18, 2007 by sharat
XML Schema DTD Markup validation Any global element can be root. No ambiguous content support. Can specify only the root element in the instance document. No ambiguous content support. Namespace support Yes. Declarations only where multiple namespaces are used. No. Code reuse Can reuse definitions using named types. Poorly supported. Can use parameter entities. [...]
Filed under: XML | 10 Comments »
Posted on May 18, 2007 by sharat
They are not written in XML syntax, which means you have to learn a new syntax in order to write them there is no support for namespaces there are no constraints imposed on the kind of character data allowed, so datatyping is not possible there is minimal support for code modularity and none for inheritance [...]
Filed under: XML | Leave a Comment »
Posted on May 16, 2007 by sharat
1. What is an Exception ? An exception is an abnormal condition that arises in a code sequence at run time. In other words, an exception is a run-time error. 2. What is a Java Exception ? A Java exception is an object that describes an exceptional condition i.e., an error condition that has occurred [...]
Filed under: Exceptions | 5 Comments »
Posted on May 15, 2007 by sharat
1.What is meant by compatible equals() and hashCode() methods ? In order for the Java Collections to work properly (and everything else in Java), the equals() and hashCode() methods must be compatible. Here, compatible means that if equals() reports that two instances are the same, then the hashCode() of both instances must be the same [...]
Filed under: Collection | 2 Comments »
Posted on May 15, 2007 by sharat
1.How to find the maximum size of heap used in the memory in java ?maxMemory(): Returns the maximum amount of memory that the Java virtual machine will attempt to use totalMemory(): Returns the total amount of memory in the Java virtual machine. Also you can use -Xmx parameter to set the max heap size. 2.What [...]
Filed under: Collection | 1 Comment »
Posted on May 12, 2007 by sharat
What is MQSeries. MQSeries is a software family developed by IBM and its components are used to enable different applications running on different operating systems to exchange data using messages and queues. MQSeries is also known as business integration software or business integration framework because of its ability to tie different types of applications [...]
Filed under: MQ Series | 1 Comment »
Posted on May 12, 2007 by sharat
What is JMS? Java Message Service: An interface implemented by most J2EE containers to provide point-to-point queueing and topic (publish/subscribe) behavior. JMS is frequently used by EJB’s that need to start another process asynchronously.For example, instead of sending an email directly from an Enterprise JavaBean, the bean may choose to put the message onto a [...]
Filed under: JMS | 1 Comment »
Posted on May 10, 2007 by sharat
What is ant? Ant is a small animal who can build magnificent buildings. Ant builds!ANT is a Java based building tool, which is similar to make, and so much better than make.ANT, what a smart name for a building tool, even the original author of ANT, James Duncan Davidson, meant “Another Neat Tool”. A [...]
Filed under: ANT | 1 Comment »
Posted on May 10, 2007 by sharat
What is JUnit? JUnit is a simple, open source framework to write and run repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit features include: Assertions for testing expected results Test fixtures for sharing common test data Test runners for running tests How do I install JUnit? First, download [...]
Filed under: JUNIT | 1 Comment »
Posted on May 10, 2007 by sharat
Servlet can have a constructor. But you never call the constructor for the servlet / instantiate them , because the container handles it. So you are better of doing initialization / one-time setup code in the init method of the servlet. Also, the container passes the ServletConfig object to the servlet only when it calls the init [...]
Filed under: Servlets | 1 Comment »