• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem with calling

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

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="100.x.xx.xxx";
return url;
}

}
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
-Arun
 
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic