[java ee programming] Which bucket does a null key map to?

2010-10-30 Thread Nirmal Kumar
Hi All, HashMap allows one key as null but Hashtable does not allow any of the keys to be null. Now if HashMap allows a one key to be null then *"Which bucket does a null key map to?"* * * *Also please tell me in which scenarios one would like to place a null key in HashMap?* *Thanks*, -Nirmal

[java ee programming] Method Overriding Rules in Java

2010-10-18 Thread Nirmal Kumar
Hi All, Can anyone explain the following Method Overriding Rules in Java: The access level *cannot be more restrictive* than the overridden method's access level. However the access level *can be less restrictive* than the overridden method's access level. The overridden method should not throw

[java ee programming] Deep Cloning Practical Scenarios

2010-04-21 Thread Nirmal Kumar
Hi All, Can anybody give me some practical scenarios in which we would do deep cloning. Any pointers would be of great help. Thanks, Nirmal \\\/// / \ | \\ // | ( | (.) (.) |) --o00o--(_)--o00o--- Stand up,be

[java ee programming] Why HashMap allows to add one NULL key ?

2010-04-15 Thread Nirmal Kumar
Hi All, Can you give me some practical scenarios where we can use null key in a * HashMap*. Thanks, Nirmal \\\/// / \ | \\ // | ( | (.) (.) |) --o00o--(_)--o00o--- Stand up,be bold,be strong. Take the whole res

[java ee programming] Can we write a constructor in Servlets?

2010-03-30 Thread Nirmal Kumar
Hi All, Please answer the following questions: Swrvlet *1. Servlet is a Java class, then why there is no constructor in Servlet. Can we write a constructor in Servlets?* * * * 2. Implicit objects of JSP are available in destroy() method or not?*

[java ee programming] Re: Using both C# and Java

2009-08-24 Thread Nirmal Kumar
Hi, Lars said it correct. Currently our project also uses the same architecture. Back-end(Business Logic + Database Access) is done in a Session Bean. Then this Session Bean is exposed via Web Service. The front end part is in .NET framework which actually invokes the methods of the Web Service.

[java ee programming] Re: What happens after deleting application folder from webapps directory

2009-07-09 Thread Nirmal Kumar
Hi, It must be stored in the browser cache/session/cookies. Try deleting your session/cookies or clearing your browser cache. Nirmal \\\/// / \ | \\ // | ( | (.) (.) |) --o00o--(_)--o00o--- Stand up,be bold,

[java ee programming] Re: Java Unit Test Tool

2009-07-08 Thread Nirmal Kumar
Hi Pallavi, As the name implies JUnit enables the developer to do Unit Testing. With JUnit the developer can Unit Test his/her class methods with different inputs. Thanks, Nirmal \\\/// / \ | \\ // | ( | (.) (.) |) --o00o--(

[java ee programming] Re: Doubt about SOAP !!!!!!

2009-07-03 Thread Nirmal Kumar
Deepak, Thanks a lot for explaining me the concept with an example. Does that mean I don't have to worry about the SOAP intermediaries as a Developer? Since I expose my Web Service and anyone who has access the WSDL of my Web Service can invoke the exposed methods of my Web Service. But one thi

[java ee programming] Re: Doubt about SOAP !!!!!!

2009-07-03 Thread Nirmal Kumar
ervices > * Adapters for (ever-changing) third-party services > > etc. > > Cheers, > > Alf > > 2009/7/2 Nirmal Kumar > >> Hi All, >> >> Web Service is a very broader term and is not specific for J2EE or .NET or >> any other platform. >> >

[java ee programming] Re: Doubt about SOAP !!!!!!

2009-07-02 Thread Nirmal Kumar
Hi All, Web Service is a very broader term and is not specific for J2EE or .NET or any other platform. The basics (*SOAP*, *WSDL*) are however same for all the platforms that is why it provides cross-platform, distributed computing. For e.g. a Java Client can invoke a method of a web Service impl

[java ee programming] Doubt about SOAP !!!!!!

2009-07-01 Thread Nirmal Kumar
Hi All, I'm new to web services and just started learning the basics i.e. SOAP, WSDL. *According to my understanding:* The *Client *sends a SOAP request to the *Receiver*. The *Receiver *then finally sends the SOAP response to the *Client*. But in books its mentioned : All SOAP messages start wi

[java ee programming] Re: Could not parse configuration: /hibernate.cfg.xml-PROBLEM

2009-06-18 Thread Nirmal Kumar
Hi, As you're getting the following error: Caused by: org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in *prolog*. Nested exception: Content is not allowed in prolog. at org.dom4j.io.SAXReader.read(SAXReader.java:482) at org.hibernate.cfg.Configu

[java ee programming] Re: Strip HTML Tags with Filter

2009-06-16 Thread Nirmal Kumar
Hi, What you can do is write a utility method and explicitly check the occurrence of and tags. If you encounter these days then don't replace them otherwise for all occurrences of other characters(.*?","") replace them in the result String. Thanks, Nirmal On Mon, Jun 15, 2009 at 9:15 PM, vu

[java ee programming] Re: Java Servlet for Loging Details

2009-06-16 Thread Nirmal Kumar
Hi, You can set the UserName in the request inside your servlet like : *request.setAttribute("UserName", userName);* In the JSP you can retrieve the User Name by using: *<%=request.getAttribute("UserName")>%* Also you can fetch the IPAddress and other information from the request object in the J

[java ee programming] Re: Java Servlet for Loging Details

2009-06-16 Thread Nirmal Kumar
Hi, You cannot use an HTML page(static) to collect those values sent from the Servlet. Why you cannot use HTML is because HTML page is a static page and does not know about "request" and "response" objects. However JSP does know about the "request" and "response" implicit objects . You've to use

[java ee programming] Re: Java Unit Test Tool

2009-06-12 Thread Nirmal Kumar
Hi Maal, I think the best JAVA UNIT TOOL is obviously *JUNIT*. Its open source and plugs into any of the IDEs whether NetBeans, Eclipse, JDeveloper, and etc Try that. Nirmal. On Thu, Jun 11, 2009 at 9:29 PM, Maal wrote: > > Hello everyone, > > I am trying to find my team a Java un

[java ee programming] Re: best book to refer-hibernate

2009-06-08 Thread Nirmal Kumar
Hi, Best books for hibernate are: 1. Java Persistence with Hibernate 2. Hibernate Reference Documentation from https://www.hibernate.org/5.html Thanks, Nirmal :) On Mon, Jun 8, 2009 at 2:04 PM, shabarish v wrote: > hi all, > which is the best book to refer hibernate. am planing to

[java ee programming] Re: Problem with Hibernate Lab

2009-05-26 Thread Nirmal Kumar
Hi, First you need to check whether you are using the correct jar or not. Check which Configuration class does the Classloader is loading. Ideally it should pick from the following : import net.sf.hibernate.cfg.Configuration;(Hibernate2) import org.hiberna

[java ee programming] Re: Trouble with Hibernate

2009-05-26 Thread Nirmal Kumar
Hi Biljana, There seems to be a problem related to memory inside JVM. You need to check what makes the Heap Space full. May be its your Java Code that is just filling the Heap area or it may be the case that your RAM is very low. Try increasing the Java Heap Max and Min values in your java option