Solved

Vector as a configuration variable

Posted on 2003-11-13
7
265 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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 100 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

820 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