Dear List,
I hope someone can give some hints to a none java/TC -specialist.
We have a jsp-servlet app, which has some important app variables inside
the web.xml. Because the validation for these parameters is quite complex
we have a single public class with public static setters and getters
Cool.
Thanks for the replies all.
Cheers
- Duncan
Ilari Kontinen wrote:
-Original Message-
From: Duncan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:50 AM
To: Tomcat Users List
Subject: Re: Global Variables
Thanks for the replies, but what do I define
Is there a way to set global variables in the web.xml which can be read
by any JSP page?
Cheers,
-Duncan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
: Wednesday, December 03, 2003 5:08 PM
Subject: Global Variables
Is there a way to set global variables in the web.xml which can be read
by any JSP page?
Cheers,
-Duncan
-
To unsubscribe, e-mail: [EMAIL PROTECTED
, December 03, 2003 11:08 AM
To: Tomcat User List
Subject: Global Variables
Is there a way to set global variables in the web.xml which can be read
by any JSP page?
Cheers,
-Duncan
-
To unsubscribe, e-mail: [EMAIL PROTECTED
.
- Original Message -
From: Duncan [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 5:08 PM
Subject: Global Variables
Is there a way to set global variables in the web.xml which can be read
by any JSP page?
Cheers,
-Duncan
ChemInformatics
-Original Message-
From: Duncan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:50 AM
To: Tomcat Users List
Subject: Re: Global Variables
Thanks for the replies, but what do I define servletContext as?
Many thanks
Duncan
Jardin Xavier wrote:
use
Message -
From: Duncan [EMAIL PROTECTED]
To: Tomcat User List [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 5:08 PM
Subject: Global Variables
Is there a way to set global variables in the web.xml which can be read
by any JSP page?
Cheers,
-Duncan
in the JSP..
-Original Message-
From: Duncan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:50 AM
To: Tomcat Users List
Subject: Re: Global Variables
Thanks for the replies, but what do I define servletContext as?
Many thanks
Duncan
Jardin Xavier wrote:
use
Sorry, if you are trying to define servletContext , please refer any JSP
book.
-Original Message-
From: Duncan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:50 AM
To: Tomcat Users List
Subject: Re: Global Variables
Thanks for the replies, but what do I define
Duncan,
and String param = servletContext.getInitParameter(param);
Thanks for the replies, but what do I define servletContext as?
In every JSP, the ServletContext object is implicitly declared with the
identifier application.
So, you should just be able to do something like this in your JSP:
-Original Message-
From: Duncan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 11:50 AM
To: Tomcat Users List
Subject: Re: Global Variables
Thanks for the replies, but what do I define servletContext as?
An easy way to get the ServletContext from JSP-page
Hi Donie,
The second half of this is you need to know how to access it:
try {
Context initCtx = new InitialContext();
String foo = (String)(context.lookup (java:comp/env/foo));
}
catch (NamingException exc) {
// oops
}
Regards,
Mathew
--
Mathew Pole
Web Architect, Gerard Industries
Hi all
Sorry for shouting but I've no hair left so it's the only thing I can do :)
Please tell me if it's possible to define a variable in server.xml or
somewhere, which is available to all running webapps.
I've looked in loads of docs and searched the archive but to no avail.
Please please
Hi Donie,
You can define a variable in the global web.xml (in conf directory).
This variable should be available to all your applications. This should
come at the end of the $TOMCAT_HOME/conf/web.xml file.
Though I have not used and tested this (I use for a single application
in application
Hi all
I want to set a variable in server.xml which can be read by all webapps. How
do I do this?
Donie
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
That's it...
Thank you very much.
SH
-Ursprüngliche Nachricht-
Von: Donie Kelly [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 3. Dezember 2001 16:46
An: 'Tomcat Users List'
Betreff: RE: How to create global variables wich could be accessed by
all jsp sites and servlet's?
Have a look
Hi,
I've found nothing about how to save Variables wich are stored globally in
reference to one context.
Normally I handle the variables in session objects for each user. But I've
some preferences wich should be read only once at the start of the tomcat
server and then always only read by the
15:36
To: Tomcat Maillist
Subject: How to create global variables wich could be accessed by all
jsp sites and servlet's?
Hi,
I've found nothing about how to save Variables wich are stored globally in
reference to one context.
Normally I handle the variables in session objects for each user
variable
myvar=myvalue
You can access these variables with
System.getProperty(myvar)
Hope this helps
Donie
-Original Message-
From: Sebastian Hagenbrock [mailto:[EMAIL PROTECTED]]
Sent: 03 December 2001 14:36
To: Tomcat Maillist
Subject: How to create global variables wich could
-Original Message-
From: Sebastian Hagenbrock [mailto:[EMAIL PROTECTED]]
Sent: 03 December 2001 14:36
To: Tomcat Maillist
Subject: How to create global variables wich could be accessed by all
jsp sites and servlet's?
Hi,
I've found nothing about how to save Variables wich
21 matches
Mail list logo