aspose file tools*
The moose likes BEA/Weblogic and the fly likes Changing applet dropdown list with config file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Changing applet dropdown list with config file" Watch "Changing applet dropdown list with config file" New topic
Author

Changing applet dropdown list with config file

Lanny Gilbert
Ranch Hand

Joined: Jun 11, 2002
Posts: 104
Here's my issue. I have an applet that I'm deploying as part of a WAR file within Weblogic. I now have a new requirement that a dropdown list within the applet should be able to be admin configurable, which means that a sys admin should be able to add/change/delete entries that will be shown in that dropdown, via tweaking of that config file. The only thing I can think of is to crack open the WAR, change the config file that is used to populate the dropdown, reWAR the file, then restart Weblogic. Which is not really a good solution.

I also don't want to deploy this applet in exploded format, as this is a production applet. Any ideas?
Lin Feng
Ranch Hand

Joined: Dec 11, 2002
Posts: 142
Can you use PARAM to populate the dropdown list of that applet? If it works , the PARAM values can be populated in a JSP page.

Thanks

Lin
Lanny Gilbert
Ranch Hand

Joined: Jun 11, 2002
Posts: 104
Yes, that *would* work. However, the JSP is also contained in the WAR file and the objective is to find a way to not crack open the WAR file, yet allow a sys admin to change values that could be read by the applet.

Thanks for your reply!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

You have to persist the data somehow. The most common persistence mechanism for web apps is a database. Other options include properties file, object or xml serialization, or flat files, all of which could be problematic for web applications. What method of persistence do you feel comfortable with? What do you feel would be easiest to incorporate into your code?


[How To Ask Questions On JavaRanch]
Lanny Gilbert
Ranch Hand

Joined: Jun 11, 2002
Posts: 104
Oh, that I *could* use a database!! The DB is hidden behind firewalls and there's no way that corporate security will open firewalls for the applet to call a DB, since we have a couple hundred desktops. If I didn't have the firewall issue, this would be in a DB in about 2 seconds.

So, I'm stuck with either a flat file that is downloaded together with the other files associated with the applet, or maybe setting up another webapp (maybe exploded) that does nothing but return XML or HTML that shows the values for the dropdown.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8971
    
    9

An applet should never directly contact a database. The applet should contact your web application which would represent the database data in an appropriate manner (plain text, XML, properties, serialized object, whatever). This is standard procedure when working with applets.
 
Don't get me started about those stupid light bulbs.
 
subject: Changing applet dropdown list with config file