Wednesday, September 5, 2012

Spring REST web service Test

We can test the Spring REST web service by following : 1. By java Junit class. 2. By SoapUI. 3. By Firefox browser plugin REST CLIENT. 4. By Chrome browser plugin POST MAN. 1. By java Junit class : We can write the java junit class to test REST service. its simple test class in ur maven web...

WARN (DefaultHandlerExceptionResolver.java:183) - Request method 'POST' not supported. For Spring REST

When Spring RESTful web service post call are throwing following exception, then we need to check 'Content-type' is set in the header/request. set the content-type in the testing client like SoapUI. if the REST controller request/response of 'json' then set the content-type as "Content-Type"...

Monday, September 3, 2012

java.lang.classnotfoundexception org.springframework.web.context.contextloaderlistener / ClassNotFoundException when running a Spring + Maven2 project on Tomcat from within Eclipse

I had a similar problem when running a spring web application in an Eclipse managed tomcat. I solved this problem by adding maven dependencies in the project's web deployment assembly. 1) Open the project's properties (e.g.right-click on the project's name in the project explorer and select "Properties") 2)...

Sunday, August 26, 2012

Saturday, August 25, 2012

Find Number of duplicates present in a ArrayList

To find the number of occurrences of duplicate integer present in List, first we will create temp List which will have no duplicates and then use collection frequecy() function to get the occurrence of duplicate number in original list. ...