All,

I have an application where I would like to override certain servlet context 
parameters.  In my application they are "serverhost" and "serverport".   I tried to do 
this:

public void beginLoginJSP(WebRequest response) throws Exception {
        sc = (AbstractServletContextWrapper) this.config.getServletContext();
        String hostname = (String) sc.getInitParameter("serverhost");
        int port = Integer.parseInt((String) sc.getInitParameter("serverport"));
        sc.setInitParameter("serverhost","localhost");
        sc.setInitParameter("serverport","7000");
}//method

public void testLoginJSP() throws Exception {
        sc.getRequestDispatcher("/login.jsp").forward(request,response);
}//method

But in my login.jsp there are the following two lines:
        String serverHost = application.getInitParameter("serverhost");
        int serverPort = Integer.parseInt((String) 
application.getInitParameter("serverport"));

These lines always have then initial web.xml values, not the ones that I reassigned in 
beginLoginJSP.   Is there something that I am not realizing?  Any help would be 
appreciated!

Regards,
Bob Brehm
Software Engineer
Xerox Corp.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to