Jon Chase

Greenhorn
+ Follow
since Feb 14, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jon Chase

Hey! I'd like to allow users of our web application to edit its configuration files through the web interface, and I've got the following idea of how to do it (and by the way, I am NOT considering using XML for configuration).

Say you've got a standard .properties file, like:

prop1.displayName=Property 1
prop1.possibleValues=1,2,3,a,b,c
prop1.value=2

prop2.displayName=Property 2
prop2.possibleValues=foo,bar,baz
prop2.value=baz


I'd like to get some type of objects back from reading this properties file which would give me something like the following:

Class: EnhancedProperties // represents the entire file
- Members:
- List properties // one entry for each main property, in our case, we'd have 2 entries (prop1 and prop2)

Class: EnhancedProperty // represents one entry from the EnhancedProperties class
- Members
- String name // in our case, "prop1"
- String displayName // in our case, "Property 1"
- String [] possibleValues // in our case, {"1","2","3","a","b","c"}
- String value // in our case, 2


Using this class, we'd automatically get all main properties, a list of their possible values (for dropdowns), a display name, and a current value, all stored in one place.

Does anyone know of anything out there similar to this? Or for that matter, something that will make config file editing for users of a UI as easy to add as this?
19 years ago
I'm looking for something (already written) that will read in a file formatted according to the definition of Apache AuthGroupFile file format and parse it into groups/users. I'm thinking there's gotta be some code out there that does it somewhere...

Each line of the group file contains a groupname followed by a colon, followed by the member usernames separated by spaces.
Example:

mygroup: bob joe anne


Even if there's not something specifically for reading the AuthGroupFile, can anyone point me in the direction of something similar?

Thanks!
Jon
19 years ago
Good advice! To try to keep the coupling as low as possible, I've gone ahead and made the "title" attribute a non-required attribute in the TLD, so users can do either:

Thanks for your suggestions!
Jon
19 years ago
JSP
Excellent! Since the first way didn't work (I'm using tomcat 5.x, isn't that jsp 2.0?), I wound up using a hybrid of your ideas:

And just made my custom tag class look for a variable named "ia.title" in the pageContext.
Thanks so much!!
Jon
19 years ago
JSP
I've written a custom tag that is invoked like this:
<custom:tag title="a title"/>
And I'm trying to accomplish the following in my JSP page:
<fmt:bundle base="messages">
<custom:tag title="<fmt:message key="foo.key"/>"/>
</fmt:bundle>
That is, I want to use a message from a resource bundle as input to my custom JSP tag.
Is this at all possible (hopefully in a straightfoward way)??
Thanks,
Jon
19 years ago
JSP
I've checked and double checked the firewall issue - but no luck - I haven't installed one and I've made sure that the WinXP firewall isn't running.
What I think is interesting is that I haven't even messed with my internet settings since reinstalling Java. The only thing I have done is uninstall and then reinstall Java - that's why this is so puzzling!!!
Any more advice?
20 years ago
This isn't so much a programming question, but stay with me...
I uninstalled the SDK on my laptop, reinstalled (j2sdk 1.4.2), and now my Java programs can no longer connect to the internet! What's more, I can't even establish a connection with the debugger (in Eclipse, for example).
What's up with this?!
Something that might matter (although I doubt it), is that I'm on a laptop (WinXP) with wireless access. I am not behind a proxy.
Any help would be greatly appreciated!!
Jon
20 years ago