Advertisement

05.14.2008 at 05:46AM PDT, ID: 23401125
[x]
Attachment Details

Static method in web application

Asked by ram_os in J2EE, Java Server Pages (JSP), Java Servlets

Hi All,

I am calling a static method in a jsp file like so :
<%=Utils.getTotal(val1,val2)%>;

public static String getTotal(int val1, int val2){
}

My getTotal method just calclulates a percentage value based on val1 and val2, it does'nt use any instance variables, just its own method variables to complete the calculation. As this method is in a web application and will be accessed by multiple user threads am I save in not declaring the method as synchronized ?

ThanksStart Free Trial
[+][-]05.14.2008 at 06:17AM PDT, ID: 21563789

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 06:27AM PDT, ID: 21563883

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 06:28AM PDT, ID: 21563893

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 06:29AM PDT, ID: 21563905

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 06:45AM PDT, ID: 21564081

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: J2EE, Java Server Pages (JSP), Java Servlets
Sign Up Now!
Solution Provided By: rrz@871311
Participating Experts: 2
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628