Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Vector as a configuration variable

Posted on 2003-11-13
7
Medium Priority
?
273 Views
Last Modified: 2010-04-01
hi all!!!
I have an application under tomcat 4.1.1.8.
I have establish my enviorement variables in the web.xml file (connection string, etc...)
I also want to establish a Vector as a configuration variable of my application, but the <env-entry> tag doesn´t support Vector class.
Any idea??
Thanks in advance.
0
Comment
Question by:sgomcres
  • 3
  • 2
  • 2
7 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9740316
Still rummaging around for details.

In the mean time.  Do you need to fully qualify it, ie. "java.util.Vector"?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9740362
Aha.  No, you can only have:

java.lang.Boolean, java.lang.Byte, java.lang.Character, java.lang.Double, java.lang.Float, java.lang.Integer, java.lang.Long, java.lang.Short, or java.lang.String.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9740379
What do you need to store in the Vector?  It sounds like you might be stretching the purpose of environment variables ;-)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:sgomcres
ID: 9740461
The vector will store strings.
I am reading something about a <resource-ref> tag in web.xml...
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 400 total points
ID: 9740496
the direct answer to you question is NO, you can do Vector in env-entry. the alternative will be:
option 1. use comma separated string and parse it later in your code.
option 2. serialize you vector in a resource file and use getResourceAsStream() to load it back to you app.
0
 

Author Comment

by:sgomcres
ID: 9740541
I only want to store a list of strings, it doesn´t matter if the strings are store in a vector or not.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9741179
then, the easiest is to separate the strings with comma in one env-entry. and use StringTokenizer to read them back.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question