This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Problem with calling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem with calling" Watch "Problem with calling" New topic

Problem with calling

michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204

I have the following code that have some figures so that i can get the value once i call this bean from servlet. Problem when i change this bean, the values that i change in this bean doesn't take effect on the servlet. what is wrong? Thanks

public class SenderConfig{

public SenderConfig(){

public static int getPortSend(){
int port=1234;
return port;

public static String getUrlSend(){
String url="";
return url;

Arun Boraiah
Ranch Hand

Joined: Nov 28, 2001
Posts: 233
From the question I understand that even if you retrieve the value from the bean and change the same when you call the bean method next time the value returned still remains the old one.
This looks obvious since the return value is hard coded in the bean hence no matter how may time you change it locally still the method return value should be the same.

Correct me if I have understood your question wrongly.

Sharing is learning
I agree. Here's the link:
subject: Problem with calling
Similar Threads
Using CMP, How To Establish Connection to the Oracle Database?
Using CMP, How to Establish Connection to the Oracle Database?
Access Control Exception