• Post Reply Bookmark Topic Watch Topic
  • New Topic

System.getProperty() in servlet and jsp - urgent  RSS feed

 
ravi bask
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I would like to know how do u register the system property, in server(say weblogic) eg: commonusername=username
and i would like to get this information (ie username) in jsp and servlet,
What is the best way to do this one, i hv so many properties like this ,so if anyone can help me i would realy appreciate it,
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why does this have to be a system property?
it would be better if you use these in you
application init. Application initialization
parameters can be specified in files like
web.xml for Tomcat. Sorry, I don't know
the equivalent for Weblogic.
regds.
- satya
 
ravi bask
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi madhav,
Accutally i hv some many properties like this, i need to get all the parameters from weblogic,(when i start the server) adn then store it in hashtable for future reference,

 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In WebLogic 5 and earlier, you put lines in the weblogic.properties file. In Version 6, that file is replaced by an XML file. Unless your properties are few and fairly directly related to operations, I'd keep them in a separate parameter file, though - that way you don't get clobbered by WLS version changes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!