Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

es kranthi

Ranch Hand
+ Follow
since Dec 27, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by es kranthi

Thanks Pete,

I am looking for a Design pattern or approach which would eliminate duplication.
Just because i am adding new fields i thought i need not write duplicate Controller methods or Business logic and some design pattern would help me.

Just like deciding the type of database driver i need to use at runtime i need an approach which allow me to determine the flow without affecting the original product.
3 years ago
The core purpose of microservices is the ability to develop each service independently and making them work together. Most of the Microservices projects are developed independently and have a common protocol of communications using Object Mapping. We cannot write all our 50 services into one project whereas we have to develop each service as a separate project module.
We can build each service in sequence and consider writing the dependency in pom.xml to build jars required for each service.
3 years ago
I have two products in spring which use the same database. But each product has a different set of fields and validations. I should be able to decide which product's Controller i need to trigger based upon a flag which is in the Parent bean. The parent bean is used by both the products.

On my JSP both my products should show different set of fields along with some common fields.

Considering conflicting modules i am trying to duplicate the code in the Controller and Business methods creating a separate flow for each of the product. As i never want one prodcut's implementation to affect the other. I see that this is not a right approach to duplicate methods in this way.

How can i make use of Inversion of Control effectively in this case without the need to rewrite the code again ? Or is there any way in spring i can implement such a kind of functionality where i can create a separate flow for each product. I am trying to modifying my implementation which is in Spring and Microservices. Any suggestions on implementation ?
3 years ago

After i ran SONAR report on my Spring application ,I am seeing an issue in SONAR report which says  "Method does not specify how to handle transaction when exception is thrown ".
Although my method has the following annotation which has rollBackFor. I am not sure why i am getting this error.

My Java class is similar to this. And i am not aboe to figure out why SONAR report stills points out that issue.

4 years ago
This issue occured when i was trying to submit a JSP to Struts 1.3 action.
The JSP is generated by another action and once we try to save the information in the JSP we are getting this error.

I heard i might have missed some naming convention while defining my FormBean. I am not sure if this is the exact root cause.
7 years ago

Can you please help me fix this issue.

Let me understand where to look for root cause.
7 years ago
int is a primitive datatype.
ArrayList accepts only objects not primitives.

Hence you got the error.Figure out how to convert int to Integer Object and pass the same to Arraylist.
Convert your integer array to Arraylist.
7 years ago
There are six placeholders in

String query = "{call shg_loans_qry(?,?,?,?,?,?)}";

and your procedure just contains 5



There is a mismatch in the number.
<jsp:include page='<%= session.getAttribute("htmlPath").toString() %>'>

Hope this could help
7 years ago
To show the total price simply use Javascript inside your JSP and to process the total price use your servlet always.

You can use Servlet if you have some internal calculations like taxes,handling charges,shipping charges for individual locations or if you need some third party price to be fetched before caluculating the total price.

If its a simple calcualtion like sum of all the products then you can use simple javascript and just show a label (div) which tells the total price.
In the servlet just calculate the total price and process.
7 years ago
There could be three reasons .
1) Case- Sensitivity
2) Document object is corrupted by assigning it to some other variable.
3) Any error in the code prior to it.

Apart from that I can see IE10 supporting getElementsByClassName.

What does the add variable contain ?
Does it have a URL or some path to another HTML or JSP ?"URL Goes here");

This means if the URL to which you are pointing does not have anything it wount display anythin in the pop-up window.
just put an alert above this code like

alert(objIndex.svnServer +" == "+prodCls.serverDoc);

if (objIndex.svnServer == prodCls.serverDoc){

Check if both are same. If both are same and still it does not go into IF condition then trim() both variables to removes spaces left and right (if any)

I hope this should help.
Use a Delete Button or an X- button to prompt the user to Delete.
The delete button needs to be fed with ID meaning the table row which should be deleted from DB.
This can be done by capturing the ID of that particular row.

write a Javascript function to call the Delete Method on the Server (Struts or Servlets) by passing this ID.
Pass this ID to DAO class and using some delete query delete the row in the DB.

Are you new to J2EE ?
7 years ago
No only that exception.
Is there any tool or way to identify an unclosed cursors ?

Somehow i found the solution myself.
If there is another connection being opened on top of the Original connection inside a loop we are facing this issue.
Now we removed the extra connection and tried and it worked .