Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 74835 Details for
Bug 198162
[server] Support ServletContext init params
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
proposed patch
servletcontextparams.txt (text/plain), 2.17 KB, created by
Simon Kaegi
on 2007-07-27 16:53:13 EDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Simon Kaegi
Created:
2007-07-27 16:53:13 EDT
Size:
2.17 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.equinox.http.servlet >Index: src/org/eclipse/equinox/http/servlet/internal/ServletContextAdaptor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/ServletContextAdaptor.java,v >retrieving revision 1.4 >diff -u -r1.4 ServletContextAdaptor.java >--- src/org/eclipse/equinox/http/servlet/internal/ServletContextAdaptor.java 23 May 2007 21:09:55 -0000 1.4 >+++ src/org/eclipse/equinox/http/servlet/internal/ServletContextAdaptor.java 27 Jul 2007 20:12:09 -0000 >@@ -55,6 +55,33 @@ > return null; > } > >+ public String getInitParameter(String name) { >+ try { >+ Method getInitParameterMethod = httpContext.getClass().getMethod("getInitParameter", new Class[] {String.class}); //$NON-NLS-1$ >+ if (!getInitParameterMethod.isAccessible()) >+ getInitParameterMethod.setAccessible(true); >+ return (String) getInitParameterMethod.invoke(httpContext, new Object[] {name}); >+ } catch (Exception e) { >+ // ignore >+ } >+ // fall-back >+ return servletContext.getInitParameter(name); >+ } >+ >+ public Enumeration getInitParameterNames() { >+ try { >+ Method getInitParameterNamesMethod = httpContext.getClass().getMethod("getInitParameterNames", null); //$NON-NLS-1$ >+ if (!getInitParameterNamesMethod.isAccessible()) >+ getInitParameterNamesMethod.setAccessible(true); >+ return (Enumeration) getInitParameterNamesMethod.invoke(httpContext, null); >+ } catch (Exception e) { >+ // ignore >+ } >+ // fall-back >+ return servletContext.getInitParameterNames(); >+ } >+ >+ > public Object getAttribute(String attributeName) { > Dictionary attributes = proxyContext.getContextAttributes(httpContext); > return attributes.get(attributeName); >@@ -109,14 +136,6 @@ > return servletContext.getContext(arg0); > } > >- public String getInitParameter(String arg0) { >- return servletContext.getInitParameter(arg0); >- } >- >- public Enumeration getInitParameterNames() { >- return servletContext.getInitParameterNames(); >- } >- > public int getMajorVersion() { > return servletContext.getMajorVersion(); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198162
: 74835