<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1942771409390799066</id><updated>2011-04-21T15:36:59.717-07:00</updated><title type='text'>time2java</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-1087116182473608968</id><published>2007-11-20T08:03:00.000-08:00</published><updated>2007-11-20T08:12:01.844-08:00</updated><title type='text'></title><content type='html'>&lt;ul&gt;&lt;li&gt;Easy to use APIs for developing web service clients.&lt;/li&gt;&lt;li&gt;Mix scripting and Java &lt;a href="http://www.devx.com/Java/Article/33206"&gt;in your code&lt;/a&gt;. Javascript comes as standard, you can add &lt;a href="https://scripting.dev.java.net/"&gt;many more&lt;/a&gt; languages.&lt;/li&gt;&lt;li&gt;&lt;a href="http://weblogs.java.net/blog/lancea/"&gt;Updated&lt;/a&gt; JDBC 4.0 APIs, and an &lt;a href="http://developers.sun.com/prodtech/javadb/"&gt;all-Java JDBC database&lt;/a&gt; included in the JDK.&lt;/li&gt;&lt;li&gt;Programmatically &lt;a href="http://blogs.sun.com/ahe/?entry=somebody_noticed_jsr_199"&gt;control&lt;/a&gt; the javac compiler.&lt;/li&gt;&lt;li&gt;Define &lt;a href="http://www.artima.com/forums/flat.jsp?forum=276&amp;amp;thread=179769"&gt;your own annotations&lt;/a&gt; and plug in the code to process them.&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.sun.com/dagastine/entry/java_6_leads_out_of"&gt;Double digit improvements&lt;/a&gt; in performance, client and server. 100,000+ tests for compatibility alone.&lt;/li&gt;&lt;li&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-1087116182473608968?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/1087116182473608968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=1087116182473608968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/1087116182473608968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/1087116182473608968'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/easy-to-use-apis-for-developing-web.html' title=''/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-9071710313985732553</id><published>2007-11-19T20:58:00.000-08:00</published><updated>2007-11-19T20:59:09.088-08:00</updated><title type='text'>demo's</title><content type='html'>&lt;a href="http://www.jetbrains.com/idea/training/demos/struts.html"&gt;http://www.jetbrains.com/idea/training/demos/struts.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-9071710313985732553?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/9071710313985732553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=9071710313985732553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/9071710313985732553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/9071710313985732553'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/demos.html' title='demo&apos;s'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-2157753419964053010</id><published>2007-11-18T19:00:00.000-08:00</published><updated>2007-11-18T19:01:36.376-08:00</updated><title type='text'>SQL</title><content type='html'>&lt;p align="left"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;AND / OR&lt;br /&gt;SELECT column_name(s)FROM table_nameWHERE conditionANDOR condition&lt;br /&gt;ALTER TABLE (add column)&lt;br /&gt;ALTER TABLE table_name ADD column_name datatype&lt;br /&gt;ALTER TABLE (drop column)&lt;br /&gt;ALTER TABLE table_name DROP COLUMN column_name&lt;br /&gt;AS (alias for column)&lt;br /&gt;SELECT column_name AS column_aliasFROM table_name&lt;br /&gt;AS (alias for table)&lt;br /&gt;SELECT column_nameFROM table_name  AS table_alias&lt;br /&gt;BETWEEN&lt;br /&gt;SELECT column_name(s)FROM table_nameWHERE column_nameBETWEEN value1 AND value2&lt;br /&gt;CREATE DATABASE&lt;br /&gt;CREATE DATABASE database_name&lt;br /&gt;CREATE INDEX&lt;br /&gt;CREATE INDEX index_nameON table_name (column_name)&lt;br /&gt;CREATE TABLE&lt;br /&gt;CREATE TABLE table_name(column_name1 data_type,column_name2 data_type,.......)&lt;br /&gt;CREATE UNIQUE INDEX&lt;br /&gt;CREATE UNIQUE INDEX index_nameON table_name (column_name)&lt;br /&gt;CREATE VIEW&lt;br /&gt;CREATE VIEW view_name ASSELECT column_name(s)FROM table_nameWHERE condition&lt;br /&gt;DELETE FROM&lt;br /&gt;DELETE FROM table_name (Note: Deletes the entire table!!)&lt;br /&gt;or&lt;br /&gt;DELETE FROM table_nameWHERE condition&lt;br /&gt;DROP DATABASE&lt;br /&gt;DROP DATABASE database_name&lt;br /&gt;DROP INDEX&lt;br /&gt;DROP INDEX table_name.index_name&lt;br /&gt;DROP TABLE&lt;br /&gt;DROP TABLE table_name&lt;br /&gt;GROUP BY&lt;br /&gt;SELECT column_name1,SUM(column_name2)FROM table_nameGROUP BY column_name1&lt;br /&gt;HAVING&lt;br /&gt;SELECT column_name1,SUM(column_name2)FROM table_nameGROUP BY column_name1HAVING SUM(column_name2) condition value&lt;br /&gt;IN&lt;br /&gt;SELECT column_name(s)FROM table_nameWHERE column_nameIN (value1,value2,..)&lt;br /&gt;INSERT INTO&lt;br /&gt;INSERT INTO table_nameVALUES (value1, value2,....)&lt;br /&gt;or&lt;br /&gt;INSERT INTO table_name(column_name1, column_name2,...)VALUES (value1, value2,....)&lt;br /&gt;LIKE&lt;br /&gt;SELECT column_name(s)FROM table_nameWHERE column_nameLIKE pattern&lt;br /&gt;ORDER BY&lt;br /&gt;SELECT column_name(s)FROM table_nameORDER BY column_name [ASCDESC]&lt;br /&gt;SELECT&lt;br /&gt;SELECT column_name(s)FROM table_name&lt;br /&gt;SELECT *&lt;br /&gt;SELECT *FROM table_name&lt;br /&gt;SELECT DISTINCT&lt;br /&gt;SELECT DISTINCT column_name(s)FROM table_name&lt;br /&gt;SELECT INTO(used to create backup copies of tables)&lt;br /&gt;SELECT *INTO new_table_nameFROM original_table_name&lt;br /&gt;or&lt;br /&gt;SELECT column_name(s)INTO new_table_nameFROM original_table_name&lt;br /&gt;TRUNCATE TABLE(deletes only the data inside the table)&lt;br /&gt;TRUNCATE TABLE table_name&lt;br /&gt;UPDATE&lt;br /&gt;UPDATE table_nameSET column_name=new_value[, column_name=new_value]WHERE column_name=some_value&lt;br /&gt;WHERE&lt;br /&gt;SELECT column_name(s)FROM table_nameWHERE condition&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-2157753419964053010?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/2157753419964053010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=2157753419964053010' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2157753419964053010'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2157753419964053010'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/sql.html' title='SQL'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-7760251180940905380</id><published>2007-11-18T09:47:00.000-08:00</published><updated>2007-11-18T09:48:08.384-08:00</updated><title type='text'>JAXBContext</title><content type='html'>&lt;h2&gt;Class JAXBContext&lt;/h2&gt;&lt;pre&gt;java.lang.Object&lt;br /&gt; &lt;img alt="extended by" src="../../../resources/inherit.gif" /&gt;&lt;b&gt;javax.xml.bind.JAXBContext&lt;/b&gt; &lt;/pre&gt; &lt;hr /&gt;  &lt;dl&gt;&lt;dt&gt;public abstract class &lt;b&gt;JAXBContext&lt;/b&gt; &lt;/dt&gt;&lt;dt&gt;extends java.lang.Object&lt;/dt&gt;&lt;/dl&gt; &lt;p&gt; &lt;/p&gt;&lt;p&gt;The &lt;tt&gt;JAXBContext&lt;/tt&gt; class provides the client's entry point to the JAXB  API. It provides an abstraction for managing the XML/Java binding information  necessary to implement the JAXB binding framework operations: unmarshal, marshal  and validate. A client application obtains new instances of this class via the  &lt;a href="../../../javax/xml/bind/JAXBContext.html#newInstance%28java.lang.String%29"&gt;&lt;code&gt;newInstance(contextPath)&lt;/code&gt;&lt;/a&gt;  method. &lt;/p&gt;&lt;pre&gt;     JAXBContext jc = JAXBContext.newInstance( "com.acme.foo:com.acme.bar" );&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The &lt;tt&gt;contextPath&lt;/tt&gt; contains a list of Java package names that contain  schema derived interfaces. The value of this parameter initializes the  &lt;tt&gt;JAXBContext&lt;/tt&gt; object so that it is capable of managing the schema derived  interfaces.  &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;SPEC REQUIREMENT:&lt;/b&gt; the provider must supply an  implementation class containing a method with the following signature:&lt;/i&gt; &lt;pre&gt;        public static JAXBContext createContext( String contextPath, ClassLoader classLoader )&lt;br /&gt;           throws JAXBException;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;&lt;i&gt;JAXB Providers must generate a &lt;tt&gt;jaxb.properties&lt;/tt&gt; file in each  package containing schema derived classes. The property file must contain a  property named &lt;tt&gt;javax.xml.bind.context.factory&lt;/tt&gt; whose value is the name  of the class that implements the &lt;tt&gt;createContext&lt;/tt&gt; API.&lt;/i&gt;  &lt;/p&gt;&lt;p&gt;&lt;i&gt;The class supplied by the provider does not have to be assignable to  &lt;tt&gt;javax.xml.bind.JAXBContext&lt;/tt&gt;, it simply has to provide a class that  implements the &lt;tt&gt;createContext&lt;/tt&gt; API.&lt;/i&gt;  &lt;/p&gt;&lt;p&gt;&lt;i&gt;In addition, the provider must call the &lt;a href="../../../javax/xml/bind/DatatypeConverter.html#setDatatypeConverter%28javax.xml.bind.DatatypeConverterInterface%29"&gt;&lt;code&gt;DatatypeConverter.setDatatypeConverter&lt;/code&gt;&lt;/a&gt;  api prior to any client invocations of the marshal and unmarshal methods. This  is necessary to configure the datatype converter that will be used during these  operations.&lt;/i&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;b&gt;Unmarshalling&lt;/b&gt;  &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;The &lt;a title="interface in javax.xml.bind" href="../../../javax/xml/bind/Unmarshaller.html"&gt;&lt;code&gt;Unmarshaller&lt;/code&gt;&lt;/a&gt;  class provides the client application the ability to convert XML data into a  tree of Java content objects. The unmarshal method for a schema (within a  namespace) allows for any global XML element declared in the schema to be  unmarshalled as the root of an instance document. The &lt;tt&gt;JAXBContext&lt;/tt&gt;  object allows the merging of global elements across a set of schemas (listed in  the &lt;tt&gt;contextPath&lt;/tt&gt;). Since each schema in the schema set can belong to  distinct namespaces, the unification of schemas to an unmarshalling context  should be namespace independent. This means that a client application is able to  unmarshal XML documents that are instances of any of the schemas listed in the  &lt;tt&gt;contextPath&lt;/tt&gt;. For example: &lt;pre&gt;        JAXBContext jc = JAXBContext.newInstance( "com.acme.foo:com.acme.bar" );&lt;br /&gt;       Unmarshaller u = jc.createUnmarshaller();&lt;br /&gt;       FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) ); // ok&lt;br /&gt;       BarObject barObj = (BarObject)u.unmarshal( new File( "bar.xml" ) ); // ok&lt;br /&gt;       BazObject bazObj = (BazObject)u.unmarshal( new File( "baz.xml" ) ); // error, "com.acme.baz" not in contextPath&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The client application may also generate Java content trees explicitly rather  than unmarshalling existing XML data. To do so, the application needs to have  access and knowledge about each of the schema derived &lt;tt&gt;ObjectFactory&lt;/tt&gt;  classes that exist in each of java packages contained in the  &lt;tt&gt;contextPath&lt;/tt&gt;. For each schema derived java class, there will be a static  factory method that produces objects of that type. For example, assume that  after compiling a schema, you have a package &lt;tt&gt;com.acme.foo&lt;/tt&gt; that contains  a schema derived interface named &lt;tt&gt;PurchaseOrder&lt;/tt&gt;. In order to create  objects of that type, the client application would use the factory method like  this: &lt;/p&gt;&lt;pre&gt;       com.acme.foo.PurchaseOrder po =&lt;br /&gt;          com.acme.foo.ObjectFactory.createPurchaseOrder();&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Once the client application has an instance of the the schema derived object,  it can use the mutator methods to set content on it.  &lt;/p&gt;&lt;p&gt;For more information on the generated &lt;tt&gt;ObjectFactory&lt;/tt&gt; classes, see  Section 4.2 &lt;i&gt;Java Package&lt;/i&gt; of the specification.  &lt;/p&gt;&lt;p&gt;&lt;i&gt;&lt;b&gt;SPEC REQUIREMENT:&lt;/b&gt; the provider must generate a class in each  package that contains all of the necessary object factory methods for that  package named ObjectFactory as well as the static &lt;tt&gt;newInstance(  javaContentInterface )&lt;/tt&gt; method&lt;/i&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;b&gt;Marshalling&lt;/b&gt;  &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;The &lt;a title="interface in javax.xml.bind" href="../../../javax/xml/bind/Marshaller.html"&gt;&lt;code&gt;Marshaller&lt;/code&gt;&lt;/a&gt; class  provides the client application the ability to convert a Java content tree back  into XML data. There is no difference between marshalling a content tree that is  created manually using the factory methods and marshalling a content tree that  is the result an &lt;tt&gt;unmarshal &lt;/tt&gt;operation. Clients can marshal a java  content tree back to XML data to a &lt;tt&gt;java.io.OutputStream&lt;/tt&gt; or a  &lt;tt&gt;java.io.Writer&lt;/tt&gt;. The marshalling process can alternatively produce SAX2  event streams to a registered &lt;tt&gt;ContentHandler&lt;/tt&gt; or produce a DOM Node  object. &lt;!-- don't expose fragment support yet   Client applications   have control over the output encoding as well as whether or not to marshal   the XML data as a complete document or as a fragment.  --&gt; &lt;p&gt;Here is a simple example that unmarshals an XML document and then marshals it  back out: &lt;/p&gt;&lt;pre&gt;        JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );&lt;br /&gt;&lt;br /&gt;       // unmarshal from foo.xml&lt;br /&gt;       Unmarshaller u = jc.createUnmarshaller();&lt;br /&gt;       FooObject fooObj = (FooObject)u.unmarshal( new File( "foo.xml" ) );&lt;br /&gt;&lt;br /&gt;       // marshal to System.out&lt;br /&gt;       Marshaller m = jc.createMarshaller();&lt;br /&gt;       m.marshal( fooObj, System.out );&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;b&gt;Validation&lt;/b&gt;  &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;blockquote&gt;There are three varieties of validation available to JAXB client  applications:  &lt;blockquote&gt; &lt;dl&gt;&lt;dt&gt;Unmarshal-time Validation  &lt;/dt&gt;&lt;dd&gt;Validation performed on the XML data as it is being unmarshalled into a Java  content tree  &lt;/dd&gt;&lt;dt&gt;On-Demand Validation  &lt;/dt&gt;&lt;dd&gt;Validation performed on the Java content tree in memory  &lt;/dd&gt;&lt;dt&gt;Fail-Fast Validation  &lt;/dt&gt;&lt;dd&gt;Validation of Java property constraints at runtime when client applications  invoke the setter methods of the generated classes &lt;/dd&gt;&lt;/dl&gt;&lt;/blockquote&gt; &lt;p&gt;See: &lt;a href="Validator.html#validationtypes"&gt;Validator javadocs&lt;/a&gt; for a  more detailed definition of the different type of validation.  &lt;/p&gt;&lt;p&gt;Although unmarshal-time validation and on-demand validation are very similar,  they are completely orthogonal operations with no dependencies on each other.  Client applications are free to use one, both, or neither types of validation.  &lt;/p&gt;&lt;p&gt;Validation errors and warnings encountered during the unmarshal and validate  operations are reported to the client application via a callback error handler  interface (&lt;a title="interface in javax.xml.bind" href="../../../javax/xml/bind/ValidationEventHandler.html"&gt;&lt;code&gt;ValidationEventHandler&lt;/code&gt;&lt;/a&gt;)  that receives &lt;a title="interface in javax.xml.bind" href="../../../javax/xml/bind/ValidationEvent.html"&gt;&lt;code&gt;ValidationEvent&lt;/code&gt;&lt;/a&gt;  objects. The &lt;tt&gt;ValidationEvent&lt;/tt&gt; objects contain information about the  error or warning encountered. JAXB allows a few diffent methods of handling  validation events which are described in more detail in the &lt;a href="Validator.html#handlingerrors"&gt;Validator javadoc&lt;/a&gt;. &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;b&gt;JAXB Runtime Binding Framework Compatibility&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;Since the JAXB Specification does not define a common runtime  system, a JAXB client application must not attempt to mix runtime objects  (&lt;tt&gt;JAXBContext, Marshaller&lt;/tt&gt;, etc. ) from different providers. This does  not mean that the client application isn't portable, it simply means that a  client has to use a runtime system provided by the same provider that was used  to compile the schema.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-7760251180940905380?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/7760251180940905380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=7760251180940905380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/7760251180940905380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/7760251180940905380'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/jaxbcontext.html' title='JAXBContext'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-1229857168359368924</id><published>2007-11-18T09:10:00.001-08:00</published><updated>2007-11-18T09:10:55.213-08:00</updated><title type='text'>java coding examples</title><content type='html'>&lt;a href="http://www.java2s.com/"&gt;http://www.java2s.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-1229857168359368924?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/1229857168359368924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=1229857168359368924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/1229857168359368924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/1229857168359368924'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/java-coding-examples.html' title='java coding examples'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-8535086679305425808</id><published>2007-11-18T08:54:00.001-08:00</published><updated>2007-11-18T08:54:56.967-08:00</updated><title type='text'>Dynamic sorting</title><content type='html'>import java.util.Comparator;&lt;br /&gt;public class BeanPropertyComparator implements Comparator {&lt;br /&gt;private String property;&lt;br /&gt;private Comparator comparator;&lt;br /&gt;public BeanPropertyComparator(String property, Comparator comparator) {&lt;br /&gt;this.property = property;&lt;br /&gt;this.comparator = comparator;&lt;br /&gt;}&lt;br /&gt;public int compare(Object bean1, Object bean2) {&lt;br /&gt;// Get the value of the properties&lt;br /&gt;Object value1 = BeanPropertyUtil.getProperty(property,bean1);&lt;br /&gt;Object value2 = BeanPropertyUtil.getProperty(property,bean2);&lt;br /&gt;return comparator.compare(value1,value2);&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-8535086679305425808?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/8535086679305425808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=8535086679305425808' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/8535086679305425808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/8535086679305425808'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/dynamic-sorting_18.html' title='Dynamic sorting'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-1019631765182043567</id><published>2007-11-18T08:44:00.000-08:00</published><updated>2007-11-18T08:45:17.579-08:00</updated><title type='text'>Dynamic sorting</title><content type='html'>&lt;a href="http://java.sys-con.com/read/45837.htm"&gt;http://java.sys-con.com/read/45837.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-1019631765182043567?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/1019631765182043567/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=1019631765182043567' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/1019631765182043567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/1019631765182043567'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/dynamic-sorting.html' title='Dynamic sorting'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-8197157659301586588</id><published>2007-11-16T20:06:00.000-08:00</published><updated>2007-11-16T20:07:30.878-08:00</updated><title type='text'>JAVA URL's</title><content type='html'>&lt;a href="http://www.venugopalareddy.com/" target="_blank"&gt;http://www.venugopalareddy.com/&lt;/a&gt;&lt;a href="http://www.jchq.net/certkey/index.htm" target="_blank"&gt;http://www.jchq.net/certkey/index.htm&lt;/a&gt;&lt;a href="http://www-106.ibm.com/developerworks/java/library/j-scjp/" target="_blank"&gt;http://www-106.ibm.com/developerworks/java/library/j-scjp/&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/l-emacs/?x=70&amp;amp;y=1" target="_blank"&gt;EMACS -linux&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www-106.ibm.com/developerworks/views/linux/tutorials.jsp" target="_blank"&gt;Perl home page tutorials&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/l-regexp/index.html?x=38&amp;amp;y=10" target="_blank"&gt;regular expressions&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/l-vi/index.html?x=42&amp;amp;y=7" target="_blank"&gt;VI editor&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/l-oops/index.html?x=67&amp;amp;https://www6.software.ibm.com/developerworks/education/l-oops/index.html?x=67&amp;amp;y=8y=8" target="_blank"&gt;fast web browsing with caching proxy&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/l-lpir21/?x=89&amp;amp;y=4" target="_blank"&gt;LINUX&lt;/a&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/l-lpir22/?x=34&amp;amp;y=3" target="_blank"&gt;LINUX ADMIN&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www-106.ibm.com/developerworks/views/java/articles.jsp" target="_blank"&gt;Java Articles&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/jpcap" target="_blank"&gt;jpcap" network analyser&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-nio/j-nio-11-2.html" target="_blank"&gt;NIO resources from IBM&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www-106.ibm.com/developerworks/java/library/j-dyn0715.html" target="_blank"&gt;Java programming dynamics, Part 3: Applied reflection&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/x-jaxb/index.html?x=46&amp;amp;y=18" target="_blank"&gt;Data Binding with JAXB&lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-threads/index.html?x=64&amp;amp;y=6" target="_blank"&gt;Java threading&lt;/a&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-collections/?x=35&amp;amp;y=12" target="_blank"&gt;Collections &lt;/a&gt;&lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-jdo/?x=44&amp;amp;y=7" target="_blank"&gt;JDO's&lt;/a&gt;   &lt;br /&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-jms/index.html?x=29&amp;amp;y=6" target="_blank"&gt;JMS&lt;/a&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-sockets/index.html?x=35&amp;amp;y=15" target="_blank"&gt;Java Sockets&lt;/a&gt;&lt;a href="https://www6.software.ibm.com/developerworks/education/j-classloader/index.html?x=37&amp;amp;y=10" target="_blank"&gt;Java Class loader&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-8197157659301586588?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/8197157659301586588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=8197157659301586588' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/8197157659301586588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/8197157659301586588'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/java-urls.html' title='JAVA URL&apos;s'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-2713761425895012627</id><published>2007-11-14T21:34:00.001-08:00</published><updated>2007-11-14T21:34:41.783-08:00</updated><title type='text'>Another nice reference manuals from netbeans</title><content type='html'>&lt;span&gt;&lt;a href="http://www.netbeans.org/kb/"&gt;http://www.netbeans.org/kb/&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-2713761425895012627?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/2713761425895012627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=2713761425895012627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2713761425895012627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2713761425895012627'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/another-nice-reference-manuals-from.html' title='Another nice reference manuals from netbeans'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-5499228184970011971</id><published>2007-11-14T13:41:00.001-08:00</published><updated>2007-11-14T13:41:59.814-08:00</updated><title type='text'>Another nice Java reference(ANJR)</title><content type='html'>&lt;a href="http://docs.codehaus.org/display/GEOTDOC/Home"&gt;http://docs.codehaus.org/display/GEOTDOC/Home&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-5499228184970011971?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/5499228184970011971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=5499228184970011971' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/5499228184970011971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/5499228184970011971'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/another-nice-java-referenceanjr.html' title='Another nice Java reference(ANJR)'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-231791051324079240</id><published>2007-11-14T13:38:00.001-08:00</published><updated>2007-11-14T13:38:32.171-08:00</updated><title type='text'>Java questions</title><content type='html'>&lt;a href="http://java.sys-con.com/read/48839.htm"&gt;http://java.sys-con.com/read/48839.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-231791051324079240?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/231791051324079240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=231791051324079240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/231791051324079240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/231791051324079240'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/java-questions_2212.html' title='Java questions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-5284824135639451888</id><published>2007-11-14T13:36:00.001-08:00</published><updated>2007-11-14T13:36:37.449-08:00</updated><title type='text'>Web services interview questions</title><content type='html'>&lt;a href="http://www.perfectxml.com/Interview1.asp"&gt;http://www.perfectxml.com/Interview1.asp&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-5284824135639451888?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/5284824135639451888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=5284824135639451888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/5284824135639451888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/5284824135639451888'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/web-services.html' title='Web services interview questions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-9067072415291141642</id><published>2007-11-14T13:34:00.000-08:00</published><updated>2007-11-14T13:35:05.589-08:00</updated><title type='text'>AJAX Tutorials</title><content type='html'>&lt;a href="http://www.techinterviews.com/?page_id=289"&gt;http://www.techinterviews.com/?page_id=289&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-9067072415291141642?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/9067072415291141642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=9067072415291141642' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/9067072415291141642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/9067072415291141642'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/ajax-tutorials.html' title='AJAX Tutorials'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-6060612175256617697</id><published>2007-11-14T13:33:00.000-08:00</published><updated>2007-11-14T13:34:08.564-08:00</updated><title type='text'>JSF questions</title><content type='html'>this is the link reffered by my friend&lt;a href="http://www.developersbook.com/jsf/interview-questions/jsf-interview-questions-faqs.htm" target="_blank"&gt;http://www.developersbook.com/jsf/interview-questions/jsf-interview-questions-faqs.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-6060612175256617697?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/6060612175256617697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=6060612175256617697' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/6060612175256617697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/6060612175256617697'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/jsf-questions.html' title='JSF questions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-2317174941409624533</id><published>2007-11-14T13:32:00.001-08:00</published><updated>2007-11-14T13:32:21.574-08:00</updated><title type='text'>AJAX questions</title><content type='html'>I would use 2 techniques: 1. come up with a scenario, and ask the candidate to suggest a solution 2. give an example for existing site and ask how AJAX is helping (eg. google mail)I'll post some more specifics. Stay tuned.Feel free to write to me for details&lt;a href="http://theyogi.blogspot.com/" target="_blank"&gt;&lt;a href="http://theyogi.blogspot.com/" target="_blank"&gt;http://theyogi.blogspot.com&lt;/a&gt;&lt;/a&gt;&lt;a href="http://www.jroller.com/page/theyogi" target="_blank"&gt;&lt;a href="http://www.jroller.com/page/theyogi" target="_blank"&gt;http://www.jroller.com/page/theyogi&lt;/a&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-2317174941409624533?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/2317174941409624533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=2317174941409624533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2317174941409624533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2317174941409624533'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/ajax-questions.html' title='AJAX questions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-7867886171801684224</id><published>2007-11-14T13:30:00.000-08:00</published><updated>2007-11-14T13:31:06.117-08:00</updated><title type='text'>Java questions</title><content type='html'>&lt;a href="http://www.geekinterview.com/Interview-Questions/Web"&gt;http://www.geekinterview.com/Interview-Questions/Web&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-7867886171801684224?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/7867886171801684224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=7867886171801684224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/7867886171801684224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/7867886171801684224'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/java-questions_4728.html' title='Java questions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-6082897987588167193</id><published>2007-11-14T13:29:00.001-08:00</published><updated>2007-11-14T13:29:36.264-08:00</updated><title type='text'>Java questions</title><content type='html'>&lt;a href="http://www.codestyle.org/index.shtml"&gt;http://www.codestyle.org/index.shtml&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-6082897987588167193?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/6082897987588167193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=6082897987588167193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/6082897987588167193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/6082897987588167193'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/java-questions_14.html' title='Java questions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-3366426102464152536</id><published>2007-11-14T13:27:00.000-08:00</published><updated>2007-11-14T13:28:27.075-08:00</updated><title type='text'>Java questions</title><content type='html'>: How can I write a program that takes command line input? A: Java programs that take input from the command line declare a special static method called main, which takes a String array as an argument and returns void. The&lt;br /&gt;example program below loops through any arguments passed to the program on the command line and lists their values.&lt;br /&gt; More details available to subscribers:How can I write a program that takes command line input?&lt;br /&gt;Q: What does public static void main(String[]) mean? A: This is a special static method signature that is used to run Java programs from a command line interface (CLI). There is nothing special about the method itself, it is a&lt;br /&gt;standard Java method, but the Java interpreter is designed to call this method when a class reference is given on the command line, as below.&lt;br /&gt; More details available to subscribers:What does public static void main(String[]) mean?&lt;br /&gt;Q: Why are command line arguments passed as a String? A: Command line arguments are passed to the application's main method by the Java runtime system before the application class or any supporting objects are instantiated.&lt;br /&gt;It would be much more complex to define and construct arbitrary object types to pass to the main method and primitive values alone are not versatile enough to provide the&lt;br /&gt;range of input data that strings can. String arguments can be parsed for primitive values and can also be used for arbitrary text input, file and URL references.&lt;br /&gt;Q: Why doesn't the main method throw an error with no arguments? A: When you invoke the Java Virtual Machine on a class without any arguments, the class' main method receives a String array of zero length. Thus, the method signature&lt;br /&gt;is fulfilled. Provided the main method does not make any reference to elements in the array, or checks the array length before doing so, no exception will occur.&lt;br /&gt;Q: Why do we only use the main method to start a program? A: The entry point method main is used to the provide a standard convention for starting Java programs. The choice of the method name is somewhat arbitrary, but is partly&lt;br /&gt;designed to avoid clashes with the Thread start() and Runnable run() methods, for example.&lt;br /&gt;Q: Can the main method be overloaded? A: Yes, any Java method can be overloaded, provided there is no final method with the same signature already. The Java interpreter will only invoke the standard entry point&lt;br /&gt;signature for the main method, with a string array argument, but your application can call its own main method as required.&lt;br /&gt;Main method modifiers Q: Can the main method be declared final? A: Yes, the static void main(String[]) method can be declared final.&lt;br /&gt;Q: I get an exception if I remove the static modifier from main! A: The static void main(String[]) method is a basic convention of the Java programming language that provides an entry point into the runtime system. The main method must&lt;br /&gt;be declared static because no objects exist when you first invoke the Java Virtual Machine (JVM), so there are no references to instance methods. The JVM creates the&lt;br /&gt;initial runtime environment in which this static method can be called, if you remove the static modifier, it will throw a NoSuchMethodException.&lt;br /&gt;Application start up Q: How can the static main method use instance variables? A: For very simple programs it is possible to write a main method that only uses static variables and methods. For more complex systems, the main method is used to&lt;br /&gt;create an instance of itself, or another primary class, as the basis of the application. The primary application object reference uses instance methods to create and interact&lt;br /&gt;with other objects, do the work and return when the application terminates.&lt;br /&gt;public class SimpleClass {&lt;br /&gt;  public void doSomething() {&lt;br /&gt;    // Instance method statements  }&lt;br /&gt;  public static main(final String[] args) {&lt;br /&gt;    SimpleClass instance = new SimpleClass();&lt;br /&gt;    instance.doSomething();  }}          Q: Can I invoke the main method from another class? A: Yes, the main method can be called from a separate class. First you must prepare the string array of arguments to pass to the method, then call the method through a&lt;br /&gt;static reference to the host class, MaxFactors in the example below.&lt;br /&gt;String[] arguments = new String[] {"123"};&lt;br /&gt;MaxFactors.main(arguments);&lt;br /&gt;&lt;br /&gt;Concurrent programming features Q: What is threaded programming and when is it used? A: Threaded programming is normally used when a program is required to do more than one task at the same time. Threading is often used in applications with graphical&lt;br /&gt;user interfaces; a new thread may be created to do some processor-intensive work while the main thread keeps the interface responsive to human interaction.&lt;br /&gt;The Java programming language has threaded programming facilities built in, so it is relatively easy to create threaded programs. However, multi-threaded programs&lt;br /&gt;introduce a degree of complexity that is not justified for most simple command line applications.&lt;br /&gt;Q: Why are wait(), notify() and notifyall() methods defined in the Object class? A: These methods are detailed on the Java Software Development Kit JavaDoc page for the Object class, they are to implement threaded programming for all subclasses of&lt;br /&gt;Object.&lt;br /&gt;Q: Why are there separate wait and sleep methods? A: The static Thread.sleep(long) method maintains control of thread execution but delays the next action until the sleep time expires. The wait method gives up control over&lt;br /&gt;thread execution indefinitely so that other threads can run.&lt;br /&gt; More details available to subscribers:Why are there separate wait and sleep methods?&lt;br /&gt;Threads and runnable types Q: What's the difference between Thread and Runnable types? A: A Java Thread controls the main path of execution in an application. When you invoke the Java Virtual Machine with the java command, it creates an implicit thread in&lt;br /&gt;which to execute the main method. The Thread class provides a mechanism for the first thread to start-up other threads to run in parallel with it.&lt;br /&gt;The Runnable interface defines a type of class that can be run by a thread. The only method it requires is run, which makes the interface very easy to to fulfil by extending&lt;br /&gt;existing classes. A runnable class may have custom constructors and any number of other methods for configuration and manipulation.&lt;br /&gt;Q: How does the run() method in Runnable work? A: It may help to think of the run method like the main method in standard single threaded applications. The run method is a standard entry point to run or execute a class.&lt;br /&gt;The run method is normally only executed in the context of an independent Thread, but is a normal method in all other respects.&lt;br /&gt; More details available to subscribers:How does the run() method in Runnable work?&lt;br /&gt;Q: A Thread is runnable, how does that work? A: The Thread class' run method normally invokes the run method of the Runnable type it is passed in its constructor. However, it is possible to override the thread's run&lt;br /&gt;method with your own.&lt;br /&gt; More details available to subscribers:A Thread is runnable, how does that work?&lt;br /&gt;Q: Why not override Thread to make a Runnable? A: There is little difference in the work required to override the Thread class compared with implementing the Runnable interface, both require the body of the run() method.&lt;br /&gt;However, it is much simpler to make an existing class hierarchy runnable because any class can be adapted to implement the run() method. A subclass of Thread cannot&lt;br /&gt;extend any other type, so application-specific code would have to be added to it rather than inherited.&lt;br /&gt;Separating the Thread class from the Runnable implementation also avoids potential synchronization problems between the thread and the run() method. A separate&lt;br /&gt;Runnable generally gives greater flexibility in the way that runnable code is referenced and executed.&lt;br /&gt;Q: What's the difference between a thread's start() and run() methods? A: The separate start() and run() methods in the Thread class provide two ways to create threaded programs. The start() method starts the execution of the new thread and&lt;br /&gt;calls the run() method. The start() method returns immediately and the new thread normally continues until the run() method returns.&lt;br /&gt;The Thread class' run() method does nothing, so sub-classes should override the method with code to execute in the second thread. If a Thread is instantiated with a&lt;br /&gt;Runnable argument, the thread's run() method executes the run() method of the Runnable object in the new thread instead.&lt;br /&gt;Depending on the nature of your threaded program, calling the Thread run() method directly can give the same output as calling via the start() method, but in the latter case&lt;br /&gt;the code is actually executed in a new thread.&lt;br /&gt;Q: Can I implement my own start() method? A: The Thread start() method is not marked final, but should not be overridden. This method contains the code that creates a new executable thread and is very specialised.&lt;br /&gt;Your threaded application should either pass a Runnable type to a new Thread, or extend Thread and override the run() method.&lt;br /&gt;Multi-threaded design questions Q: Do I need to use synchronized on setValue(int)? A: It depends whether the method affects method local variables, class static or instance variables. If only method local variables are changed, the value is said to be&lt;br /&gt;confined by the method and is not prone to threading issues.&lt;br /&gt; More details available to subscribers:Do I need to use synchronized on setValue(int)?&lt;br /&gt;Q: How do I create a Runnable with inheritance? A: To introduce a Runnable type to an existing class hierarchy, you need to create a sub-class that declares that it implements the Runnable interface, and provide a run&lt;br /&gt;method to fulfil the interface. This combination of interface and inheritance means that runnable implementations can be very minor extensions of existing classes, as in the&lt;br /&gt;example below...&lt;br /&gt; More details available to subscribers:How do I create a Runnable with inheritance?&lt;br /&gt;Q: What is the SwingUtilities.invokeLater(Runnable) method for? A: The static utility method invokeLater(Runnable) is intended to execute a new runnable thread from a Swing application without disturbing the normal sequence of event&lt;br /&gt;dispatching from the Graphical User Interface (GUI). The method places the runnable object in the queue of Abstract Windowing Toolkit (AWT) events that are due to be&lt;br /&gt;processed and returns immediately. The runnable object's run() method is only called when it reaches the front of the queue.&lt;br /&gt;The deferred effect of the invokeLater(Runnable) method ensures that any necessary updates to the user interface can occur immediately, and the runnable work will begin&lt;br /&gt;as soon as those high priority events are dealt with. The invoke later method might be used to start work in response to a button click that also requires a significant change&lt;br /&gt;to the user interface, perhaps to restrict other activities, while the runnable thread executes.&lt;br /&gt;Q: What is the volatile modifier for? A: The volatile modifier is used to identify variables whose values should not be optimized by the Java Virtual Machine, by caching the value for example. The volatile modifier&lt;br /&gt;is typically used for variables that may be accessed or modified by numerous independent threads and signifies that the value may change without synchronization.&lt;br /&gt;Q: Which class is the wait() method defined in? A: The wait() method is defined in the Object class, which is the ultimate superclass of all others. So the Thread class and any Runnable implementation inherit this method&lt;br /&gt;from Object. The wait() method is normally called on an object in a multi-threaded program to allow other threads to run. The method should should only be called by a&lt;br /&gt;thread that has ownership of the object's monitor, which usually means it is in a synchronized method or statement block.&lt;br /&gt; More details available to subscribers:Which class is the wait() method defined in?&lt;br /&gt;Thread programming jargon Q: What is a green thread? A: A green thread refers to a mode of operation for the Java Virtual Machine (JVM) in which all code is executed in a single operating system thread. If the Java program has&lt;br /&gt;any concurrent threads, the JVM manages multi-threading internally rather than using other operating system threads.&lt;br /&gt;There is a significant processing overhead for the JVM to keep track of thread states and swap between them, so green thread mode has been deprecated and removed from&lt;br /&gt;more recent Java implementations. Current JVM implementations make more efficient use of native operating system threads.&lt;br /&gt;Multi-threaded design patterns Q: What is a working thread? A: A working thread, more commonly known as a worker thread is the key part of a design pattern that allocates one thread to execute one task. When the task is&lt;br /&gt;complete, the thread may return to a thread pool for later use. In this scheme a thread may execute arbitrary tasks, which are passed in the form of a Runnable method&lt;br /&gt;argument, typically execute(Runnable). The runnable tasks are usually stored in a queue until a thread host is available to run them.&lt;br /&gt;The worker thread design pattern is usually used to handle many concurrent tasks where it is not important which finishes first and no single task needs to be coordinated&lt;br /&gt;with another. The task queue controls how many threads run concurrently to improve the overall performance of the system. However, a worker thread framework requires&lt;br /&gt;relatively complex programming to set up, so should not be used where simpler threading techniques can achieve similar results.&lt;br /&gt;Can I use a Javascript file stored as .jds? A: On the Web, the file extension you use for Javascript is not as important as the Content-Type header it is served with. With Apache, add this line to your .htaccess&lt;br /&gt;configuration file:&lt;br /&gt;AddType "application/x-javascript; charset=iso-8859-1" jds          It is certainly best to separate your Javascript from your HTML like this in most cases. Firstly, it makes the script easier to edit and maintain, and means that any&lt;br /&gt;number of HTML pages can reference the same script. Normally, a shared external script will only be downloaded once for each visitor, which speeds up delivery of your&lt;br /&gt;page.&lt;br /&gt;Javascript problems Q: My Javascript code is showing! A: It is conventional to put HTML comments around Javascript element content to hide it from browsers, like so ...&lt;br /&gt; More details available to subscribers:My Javascript code is showing!&lt;br /&gt;Q: I can't get your script to work! A: One of the key steps in externalising scripts is to ensure that all script file references are accurate.&lt;br /&gt;Is the external file reference correct?The Code Style site uses relative URL paths with a leading forward slash, /; this means the URL is relative to the root level of the domain, not the current directory. If you are&lt;br /&gt;adapting Code Style examples on a local file system, you will need to change these file references accordingly.&lt;br /&gt;The following examples use stylesheet references, but the same conditions apply to all external files including scripts and images.&lt;br /&gt;./Style.css Refers to the file Style.css in same directory as the HTML source, the "current" directory. styles/Style.css Refers to the file Style.css in a subdirectory of the current directory called styles. ../styles/Style.css Refers to the file Style.css in a directory called styles at the same hierarchical level as the current directory, i.e. in parallel to it. Has the script file loaded?To check if an external script file has loaded, add the following code to the top of the file and reload the HTML:&lt;br /&gt;// Debuggingalert('Script loaded.');          This should raise a visible dialogue box if the script loads (you may need to clear your browser's cache to force a reload). Once you're sure the script has loaded, put&lt;br /&gt;other temporary alerts into the script to find out which parts execute and which fail.&lt;br /&gt;Q: I can't get Javascript to check for null strings correctly! A: It would help to see a fragment of the code. One thing to watch out for is the use of a single assignment equals instead of the double comparison equals...&lt;br /&gt; More details available to subscribers:I can't get Javascript to check for null strings correctly!&lt;br /&gt;Q: I get "Done, but with errors on page" in IE! A: The message "Done, but with errors on page" is an Internet Explorer error message that means there was a problem with one or more of the Javascript statements on the&lt;br /&gt;page. Normally you will see a warning icon alongside the error message in the status bar. If you double click on the icon, a status message will open to give details of the&lt;br /&gt;problem, which may help you fix the errors.&lt;br /&gt;Working with dates in Javascript Q: How do I get the difference between two dates in Javascript? A: There are two elements to this question, first to find the difference between two dates and second to format the result. The code below creates three variables to represent&lt;br /&gt;time intervals in milliseconds, then creates two dates with specific times on the same day. This could be adapted for any two dates, including the current time using the&lt;br /&gt;basic Date() constructor.&lt;br /&gt; More details available to subscribers:How do I get the difference between two dates in Javascript?&lt;br /&gt;Q: How can I add 7 days to a date in Javascript? A: The example below creates a new Date object and a set of constants to calculate the number of milliseconds in 7 days. The 7 day figure is added to the original time and&lt;br /&gt;used to create a second Date object.&lt;br /&gt; More details available to subscribers:How can I add 7 days to a date in Javascript?&lt;br /&gt;File security constraints Q: Can I get the file size on the client side? A: It is not possible to access files on a person's computer using Javascript through a Web browser, or to read the properties of files. It would be a serious security and&lt;br /&gt;privacy hazard if Javascript code in a Web page could read files on your computer because the information could be sent back to the site via a form or other mechanisms.&lt;br /&gt;For these reasons the possibility of file access was excluded when the Javascript language was designed.&lt;br /&gt;Other client side solutions such as ActiveX and Java applets require special security consent from the user, which many people are reluctant to grant, and only make the job&lt;br /&gt;more complicated and risky from their point of view. Not all Web browsers are configured to support ActiveX or Java.&lt;br /&gt;The only effective way to check the size of a file for upload is on the server side. Your server side form handler must process the file and this is the best place to apply a limit&lt;br /&gt;to the number of bytes you will accept.&lt;br /&gt;Q: How can I create a file on the client side? A: It is not possible to create files on the client's computer using Javascript. This type of action is excluded from the Javascript language because it would be a serious&lt;br /&gt;security hazard. The only form of local file storage available through Javascript is cookies, whose behaviour and contents are strictly prescribed.&lt;br /&gt;Of course it is possible to use Javascript to generate file content in a Web browser window and invite people to save the contents. Internet Explorer and Firefox users can&lt;br /&gt;use the File menu Save as... option directly, but Opera and other browser users may have to copy the text into another application to save it.&lt;br /&gt; More details available to subscribers:How can I create a file on the client side?&lt;br /&gt;Window and frame communication Q: Can I get the URL of any other browser window? A: Web browsers' Window object references only extend as far as windows in the same frameset or "child" windows spawned from a specific document. It would be a user&lt;br /&gt;security violation if a script could read any other window's URL because this information could be communicated back to the script's host. For instance, you could append&lt;br /&gt;the URL to the query parameter of a second page on the script's host, redirect to that URL and log or process the request.&lt;br /&gt;What are your general guidelines about CSS? A: One of the key issues for authoring stylesheets is to be aware of the complex variety of software and hardware combinations and configurations that people use on the&lt;br /&gt;Web, and concede that you cannot predict or ultimately control the way your documents are presented to users. Therefore it is vital that the underlying markup of your HTML&lt;br /&gt;document makes sense without CSS.&lt;br /&gt;Unless there is an exceptional case, and with font-size in particular, use proportional length values in stylesheets for the Web, preferably percentages % or em values.&lt;br /&gt;Proportional values allow Web documents to scale relative to users' browser settings and screen resolution. Wherever you specify a color property, also specify a suitable, contrasting background property and vice-versa. This helps ensure that if the user has specified any personal&lt;br /&gt;style settings, your document should still be legible. Many HTML elements do not strictly require a close tag, but it is important to explicitly close all relevant elements to optimise CSS rendering with certain browsers. Q: What is "presentational markup"? A: The most common example of HTML used primarily for presentational effect is the font element, which may specify the font family, size and colour of text on screen.&lt;br /&gt;Other textual examples include big, small, b and i elements, or the link, background, vlink and alink attributes of the body element.&lt;br /&gt; More details available to subscribers:What is "presentational markup"?&lt;br /&gt;Q: Where can I find out more about CSS? A: The primary source of answers to frequently asked questions about CSS is the comp.infosystems.www.authoring.stylesheets (C.I.W.A.S) newsgroup FAQ.&lt;br /&gt;CSS techniques Q: Has the stylesheet loaded? To check if an external stylesheet file has loaded, add an extreme style rule to make it obvious and reload the HTML:&lt;br /&gt;BODY{  color:            black;  background:       red;}      Q: How can I hide my CSS? A: It is not possible for you to prevent read access to CSS files on the server side and have client browsers render the stylesheet. The browser must be able to download a&lt;br /&gt;CSS file to render the styles it contains, this is the nature of the Web. The only way to prevent others viewing your CSS is not to publish it at all.&lt;br /&gt;Q: Can I resize a whole site with CSS? A: If the site was designed for a fixed size then it may be quite difficult to adjust. If the widths of the page elements are set exclusively in the CSS, not in HTML tables, you&lt;br /&gt;may be in with a chance; it would make the job easier. But the standard markup of the page may be the limiting factor. If the document markup is too rigid, you may need to&lt;br /&gt;go back to the drawing board.&lt;br /&gt;One quick way to get the measure of a Web site is to switch off CSS in your browser and see how it looks (see CSS browser configuration). If the navigation bars run down&lt;br /&gt;the page and the text is full width when CSS is switched off, you may be in luck.&lt;br /&gt;Q: Can I use script variables in my CSS? A: Yes, you can use an ASP, JSP or other scripting mechanisms to customise a style sheet, but you must serve it with the right HTTP Content-Type header: text/css.&lt;br /&gt;Also, bear in mind that what you serve one person, may be held in shared caches and viewed by other people too. So, to ensure that everybody else gets the default style&lt;br /&gt;sheet settings, you should also set no-cache headers.&lt;br /&gt;If you prevent caches from storing your style sheet, it puts a heavier load on your Web server and will slow down every page request, which defeats one of the great&lt;br /&gt;strengths of CSS.&lt;br /&gt;Q: How can I block overrides from another stylesheet? A: CSS is implemented in a way that applies a style sheet to the whole of a Web document; specific style rules are attached to page elements based on selectors. One&lt;br /&gt;style sheet cannot "block" part of another, but you can override a style rule with a more specific selector.&lt;br /&gt; More details available to subscribers:How can I block overrides from another stylesheet?&lt;br /&gt;CSS syntax and markup Q: How can I combine a style rule with HTML code? A: To apply so called "inline" styles, use the style attribute of the element you want to style.&lt;br /&gt;&lt;p style="font-size: larger; text-transform: uppercase;"&gt; Paragraph text&lt;/p&gt;          This technique can be useful when experimenting with new designs, but defeats one of the great strengths of CSS, using an external stylesheet to apply the same&lt;br /&gt;styles to any number of pages.&lt;br /&gt;Q: How can I combine style rules with each other? A: It is not possible to combine rules in a CSS stylesheet, but you can assign multiple classes to a single element in a space separated list...&lt;br /&gt; More details available to subscribers:How can I combine style rules with each other?&lt;br /&gt;Q: How do I remove underlines from links in my pop-ups? A: General usability advice is that people expect hyperlinks to be underlined, so your navigation may be overlooked if they are not. If you disable underlines, you should use&lt;br /&gt;text and colours to make the links as conspicuous as possible.&lt;br /&gt;Where you use dynamic markup techniques to create whole Web pages, such as pop-up windows, you must ensure that the HTML includes valid references to your&lt;br /&gt;cascading style sheets. You must add a head element to the HTML root element and all necessary link elements, as below.&lt;br /&gt; More details available to subscribers:How do I remove underlines from links in my pop-ups?&lt;br /&gt;Q: What does the selector #content do? A: The selector #content matches any element with the id attribute "content", as below:&lt;br /&gt;&lt;h3 id="content"&gt;  Table of contents&lt;/h3&gt;           More details available to subscribers:What does the selector #content do?&lt;br /&gt;CSS styling tips Q: How do I set the background colour in CSS? A: When you set the background colour of a Web page using CSS you should also set the text colour, to ensure that there is a legible contrast between them. This is&lt;br /&gt;because some people configure their browsers to display Web pages with their own style sheet, which may have its own text colour setting. If you set the background colour&lt;br /&gt;without the text colour, your background may be the same as the reader's foreground text colour.&lt;br /&gt;The background colour for the whole page is attached to the HTML body element, as below, but you can use any CSS selector to colour more specific areas of the page.&lt;br /&gt; More details available to subscribers:How do I set the background colour in CSS?&lt;br /&gt;Q: How do I style list elements? A: List items can be selected in CSS using the li element selector. It is also possible to select and style items in un-ordered lists independently from those in ordered lists,&lt;br /&gt;and style specific items, as below.&lt;br /&gt; More details available to subscribers:How do I style list elements?&lt;br /&gt;Q: How do I make the text fit alongside an image bar? A: It would preferable to control your image placement than try to restrict the size of the fonts, which can be very harmful to the legibility of your documents. One suggestion&lt;br /&gt;is to put the text in a div element with a specific class, and set the bar as a background image.&lt;br /&gt; More details available to subscribers:How do I make the text fit alongside an image bar?&lt;br /&gt;Q: Is it possible to create a frames effect with CSS? A: To create frame-like sites using CSS use a position: fixed declaration on your menu division. You must also set the properties top, left and width. It's best to stick with&lt;br /&gt;percentage values for these lengths, to position your menu according to the size of the users' screen.&lt;br /&gt; More details available to subscribers:Is it possible to create a frames effect with CSS?&lt;br /&gt;Q: Can I scale background images to different screen resolutions? A: It is difficult to answer questions like this without seeing the background image and the visual design you are trying to achieve. If you plan to use a "liquid" page layout,&lt;br /&gt;where the page elements may expand proportionally to the width of the screen, consider how you might slice the image up and use the parts as the background image for&lt;br /&gt;different page elements. In particular, focus on any horizontal lines in the background that may define different navigational parts of the page, these can be the most difficult&lt;br /&gt;part of a liquid design.&lt;br /&gt; More details available to subscribers:Can I scale background images to different screen resolutions?&lt;br /&gt;Q: How can I style browser window components? A: The browser window properties you are seeking to influence are proprietary features of individual browsers that are not currently part of the W3C CSS recommendations.&lt;br /&gt;However, these features are directly accessible in recent versions of Microsoft Internet Explorer and Opera ...&lt;br /&gt;General container questions Q: What's the difference between application servers and Web servers? A: Web servers are primarily designed to deliver Web site content and not much besides. Application servers may include a Web server component, such as a Java servlet&lt;br /&gt;container, but manage it alongside other components, such as an Enterprise JavaBeans container, so that there is a shared execution context amongst them.&lt;br /&gt;Q: How can I write a servlet container using Java? A: You are strongly recommended to join an existing servlet container project rather than write one yourself. A servlet container is an extremely complex system to create&lt;br /&gt;and most implementations have taken many years to develop to a robust, high performance standard. The Apache Tomcat container is an open source project that would be&lt;br /&gt;a good place to start.&lt;br /&gt;Q: Does the servlet run when the container starts up? A: Servlet classes are not normally initialised when the servlet container is first started, they are brought into service when the first request for the servlet is received. Much of&lt;br /&gt;the time this "just in time" approach will not cause a significant delay. If a servlet has overridden the init(ServletConfig) method with a with a lengthy initialisation stage, the&lt;br /&gt;first user must wait for the method to return before the servlet handles their request.&lt;br /&gt;Q: What happens if the server is not loaded into memory? A: If the server or container object is not loaded in memory because it is shutting down or starting up, it will not be listening for requests and cannot accept connections. Any&lt;br /&gt;clients that attempt to connect to the server will normally fail after a client-specific timeout period.&lt;br /&gt;Q: Is the session ID stored in the servlet or container? A: When you first request a session through the HttpServletRequest object, the servlet container manages the creation and storage of a reference to the HttpSession object.&lt;br /&gt;If a subsequent request is received that corresponds with an existing session object, the HttpServletRequest getSession() method will return the session object created in&lt;br /&gt;the first request.&lt;br /&gt; More details available to subscribers:Is the session ID stored in the servlet or container?&lt;br /&gt;Container configuration Q: What is web.xml for? A: The web.xml file contains configuration information for a single Web application. It includes configuration entries for each of the filters and servlets in the application, and a&lt;br /&gt;set of URL mappings for each. There is also a set of configuration entries that apply to every filter, servlet and JSP in the Web application context.&lt;br /&gt;Context, filter and servlet configurations may contain a set of name and value pairs that are loaded by the servlet container when it starts up. The URL mappings tell the&lt;br /&gt;container which resources should be used to process incoming requests, and the configuration parameters are used to pass variables to those resources.&lt;br /&gt;Q: What is a servlet URL mapping? A: A servlet URL mapping is the second part of a servlet configuration in a Web application's web.xml file. The first part declares the servlet and gives it a name, the URL&lt;br /&gt;mapping tells the servlet container on which URL the servlet should operate, as below.&lt;br /&gt; More details available to subscribers:What is a servlet URL mapping?&lt;br /&gt;Q: Do I need a different web.xml for each server? A: The /WEB-INF/web.xml configuration scheme is common to all servlet containers that conform to the Java Servlet Specification version 2.2 and later. Some servlet&lt;br /&gt;containers have supplementary configuration files to apply their own special features. You need a web.xml file for each Web application you create. There is also a web.xml&lt;br /&gt;file for the servlet container as a whole.&lt;br /&gt;Q: How do I load a servlet at start-up? A: To request a servlet is initialized when the container starts up, add the load-on-startup element to the web.xml file in your WEB-INF directory, as below. Any positive&lt;br /&gt;integer value will signal start up initialization.&lt;br /&gt; More details available to subscribers:How do I load a servlet at start-up?&lt;br /&gt;Q: How can I create database connections for all servlets? A: The standard way to preserve database connections between servlet requests is to use a connection pool that governs access to a number of live connections. The pool&lt;br /&gt;uses your primary database driver to create the connections in advance and makes pooled connections available through its own URL identifier. When the application closes&lt;br /&gt;a pooled connection it just returns to the pool.&lt;br /&gt; More details available to subscribers:How can I create database connections for all servlets?&lt;br /&gt;Apache JServ questions Q: I can't compile any servlets and JServ doesn't work! A: If your compiler is failing with missing javax package references, it is very likely your classpath does not include jsdk.jar, the Java Servlet Development Kit. You need to&lt;br /&gt;include a line like this in a backed up copy of your autoexec.bat file and reboot your computer:&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-3366426102464152536?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/3366426102464152536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=3366426102464152536' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/3366426102464152536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/3366426102464152536'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/java-questions.html' title='Java questions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-8321557875952263397</id><published>2007-11-13T11:59:00.001-08:00</published><updated>2007-11-13T11:59:37.567-08:00</updated><title type='text'></title><content type='html'>public static String reverse(String s) {&lt;br /&gt;char[] carray=s.toCharArray();&lt;br /&gt;char[] carray2=new char[carray.length];&lt;br /&gt;for(int i=carray.length-1, j=0; i&gt;=0; i--, j++) {&lt;br /&gt;carray2[j]=carray[i];&lt;br /&gt;}&lt;br /&gt;return new String(carray2);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-8321557875952263397?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/8321557875952263397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=8321557875952263397' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/8321557875952263397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/8321557875952263397'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/public-static-string-reversestring-s.html' title=''/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-3337621410411870103</id><published>2007-11-13T10:18:00.000-08:00</published><updated>2007-11-13T10:49:16.939-08:00</updated><title type='text'></title><content type='html'>Hibernate works well when you control the data model,&lt;br /&gt;IBATIS: works well when you need to integrate with an existing database&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-3337621410411870103?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/3337621410411870103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=3337621410411870103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/3337621410411870103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/3337621410411870103'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/hibernate-works-well-when-you-control.html' title=''/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-6528353017330081336</id><published>2007-11-13T10:16:00.001-08:00</published><updated>2007-11-13T10:16:54.175-08:00</updated><title type='text'></title><content type='html'>Hibernate or iBatisPosted by: Jay Blanton on February 24, 2005 DIGG I have just joined a team that is starting to build an architecture based on multiple components that will facilitate and old DBMS and a new developed DBMS. Most of the direction was towards a straight JDBC framework. But I just came form a project that utilized Hibernate. Hibernate was very powerful and fulfilled a majority of the requirements, with only one issue that we ran into. We had created all our own integration to work with Hibernate, but really wanted to use Spring. So at my new company, I am suggesting Spring, but I am uncertain whether Hibernate or iBatis is a better solution. Hibernate is awesome in its capabilities and the limited amount of HQL that is required to produce so many of the CRUD operations. iBatis is an excellent choice as well because the framework could work with both our Java and .Net code, and utilizes SQL instead of requiring a new language to learn. Currently our database is horribly normalized...to receive improvements through a rewrite...but in the interim, both databases will need to be utilized. Can anyone lend me any thoughts as to why they would choose one over they other?&lt;br /&gt;Thanks,&lt;br /&gt;-jay      Message #158594  Post reply Post reply Post reply  Go to top Go to top Go to top    Hibernate or iBatis Posted by: adrian osullivan on February 25, 2005 in response to Message #158540 I think you've identified the key difference between the two frameworks - HQL vs vendor SQL. At the end of the day, HQL, like JDOQL and EJBQL cannot take full advantage of vendor-specific DB features, such as Oracle pl/sql. The question is, do you frequently use those vendor-specific features? If so, I think Hibernate must be ruled out. If you only use vendor features rarely, Hibernate can be used. In general, it seems more powerful and robust than iBatis, so I would prefer to use it if you can get around the learning curve.&lt;br /&gt;On our project we had a lot of complex procedures which benefitted from a lot of custom PL/SQL so we chose iBatis. Its is also much easier for developers to learn than Hibernate.&lt;br /&gt;However, its worth noting that Hibernate 3 (currently in Beta) will support vendore-specific calls. When that happens, I think iBatis may struggle to compete.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-6528353017330081336?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/6528353017330081336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=6528353017330081336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/6528353017330081336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/6528353017330081336'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/11/hibernate-or-ibatisposted-by-jay.html' title=''/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-7218871034246206806</id><published>2007-10-28T02:54:00.000-07:00</published><updated>2007-10-28T02:55:08.012-07:00</updated><title type='text'>java one sessions</title><content type='html'>&lt;a href="http://developers.sun.com/learning/javaoneonline/j1online.jsp?track=5&amp;amp;yr=2007"&gt;http://developers.sun.com/learning/javaoneonline/j1online.jsp?track=5&amp;amp;yr=2007&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-7218871034246206806?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/7218871034246206806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=7218871034246206806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/7218871034246206806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/7218871034246206806'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/10/java-one-sessions.html' title='java one sessions'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1942771409390799066.post-2448698868202915498</id><published>2007-10-28T01:54:00.000-07:00</published><updated>2007-10-28T02:03:05.965-07:00</updated><title type='text'>My first post</title><content type='html'>&lt;a href="http://netsmith.wikispaces.com/EngagingValuePresentationStyle"&gt;http://netsmith.wikispaces.com/EngagingValuePresentationStyle&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1942771409390799066-2448698868202915498?l=time2java.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://time2java.blogspot.com/feeds/2448698868202915498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1942771409390799066&amp;postID=2448698868202915498' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2448698868202915498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1942771409390799066/posts/default/2448698868202915498'/><link rel='alternate' type='text/html' href='http://time2java.blogspot.com/2007/10/my-first-java-post.html' title='My first post'/><author><name>I me myself mine</name><uri>http://www.blogger.com/profile/05702264057248825993</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
