-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4109152
By: oniseijin
I can't seem to manage to get the variables I have set with initArgs.
The documenation points me to use applicationScope, but the variable I set in web.xml or servlets.properties does not show up.
So, basically, how do I go end to end from a variable in web.xml or servlets.properties and retrieve it within a zscript?
I can see in the zkdemo-all that there is a i3-label_ja.properties that set's the username, but how is this loaded or accessed in the application later on?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4109674
By: henrichen
I don't quite catch what you ask. Can you provide a "minimum", "working" example code so we can test it here?
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4110710
By: oniseijin
Ok, I'll be a bit more specific, and I'm sure there are more than one way to do this, but I can't get any to work
In the web.xml, I have the following:
<init-param>
<param-name>proxy</param-name>
<param-value>null</param-name>
</init-param>
And then I try an access this in a <zscript>
proxy = applicationScope.get("proxy")
That is what I thought I should do by reading the documents, but it didn't work.
Basically, what I want to know is how to pass servlet level configurations to zscript or other ZK components.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4110763
By: henrichen
proxy = desktop.webApp.getInitParameter("proxy");
/henri
Just to clarify, this only allows access to <context-param> elements. I made the mistake of trying to specify an <init-param> element for the zkLoader servlet and that will not work for this purpose.
Asked: 2007-01-18 08:52:37 +0800
Seen: 199 times
Last updated: Mar 06 '09