Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Re: httpContext extension point not working, but servlet extension point is?
Re: httpContext extension point not working, but servlet extension point is? [message #113852] Thu, 10 July 2008 08:49 Go to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Hi,

Korotney, James schrieb:

> I am using the servletbridge. I can see my
> org.eclipse.equinox.http.registry.servlets registered servlets fine,
> both in a jetty container as well as in Tomcat launched within eclipse
> as a Java application. But, I can not see any httpContexts registered
> under the extension point

> [...] In jetty, I can only access my servlets directly.

> This works:
>
> http://localhost/myServlet?foo=bar
>
> ****This does not work:
>
> http://localhost/myWebAppContext/myServlet?foo=bar
>

Although the OSGi HttpContext "maps" one-on-one onto a ServletContext it
has no influence on the URL of the servlets like the ServletContext.

In OSGi, every alias defined is applied to the root of the HttpService.
Note, the root of the embedded Jetty based HttpService is the real root
("http://server/") whereas the root of the ServletBridge based
HttpService is the web application root.


> Plugin.xml:
>
> <plugin>
> <extension point="org.eclipse.equinox.http.registry.httpcontexts">
> <httpcontext
> name="myWebAppContext"
> path="/myWebAppContext ">
> </httpcontext>
> </extension>

Please check the documentation. There is no "path" element. Also the
"name" element has never made it into API.

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/reference/extension-points/org_eclipse_eq uinox_http_registry_httpcontexts.html


-Gunnar

--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
Re: httpContext extension point not working, but servlet extension point is? [message #113865 is a reply to message #113852] Thu, 10 July 2008 13:55 Go to previous messageGo to next message
James Korotney is currently offline James KorotneyFriend
Messages: 1
Registered: July 2009
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_003F_01C8E273.22657510
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Relevant to my incorrect extension point usage - sorry - I originally =
went from the documented extension point reference, but then was messing =
around based on a clearly out-of-date posting somewhere else. Corrected =
plugin.xml below.

I had a hard time find decent documentation or examples, including =
looking that the OSGi spec and the org.osgi.* javadoc. I was about to =
start looking at internal source to see what was going on, but I then =
you (Gunner) responded...

What you are telling me (as I understand it) is surprising. I would =
have expected the implementation to proxy certain information - such as =
my query to get the containing web app context within the Servlet =
service via=20
=
HttpServletRequest.getSession().getServletContext().getServl etContextName=
();

Alas, this only returns null, either within the equinox embedded Jetty =
or a Tomcat container (even though the URL works correctly).

Would this be considered a bug in the implementation? If not, the osgi =
docs, nor the extension point documentation makes clear what you seem to =
be implying - that the context of the container is unknown to the =
extensions. Also, there is not clear communication that the =
servletContext is not fully proxied... or I am simply missing that =
explanation.

As for now, my approach is to pass in an init param on my servlet =
extension point to take care of identifying the container web app =
context (which i do not like too much, but at least it is specified in =
the same plugin.xml where I would have specified the httpcontext via the =
org.eclipse.equinox.http.registry.httpcontexts extension point). Any =
suggestions otherwise?

Thank you for any and all help!

plugin.xml
<plugin>

<extension

id=3D"cwinfocenter"

name=3D"cwinfocenter"

point=3D"org.eclipse.equinox.http.registry.httpcontexts">

<httpcontext

id=3D"cwinfocenter">

<resource-mapping path=3D"/web-content"/>

</httpcontext>

</extension>


<extension

id=3D"contextInfoServlet"

name=3D"contextInfoServlet"

point=3D"org.eclipse.equinox.http.registry.servlets">

<servlet

=
class=3D"com.compuware.frameworks.viz.help.cshprovider.CSHServlet "

alias=3D"/contextInfo"

httpcontextId=3D"cwinfocenter"

load-on-startup=3D"true">

<init-param

name=3D"webAppContext"

value=3D"cwinfocenter">

</init-param>

</servlet>

</extension>

</plugin>

Regards,=20
James=20

--=20

James Korotney
Technical Consultant, Technical Architecture
Compuware
One Campus Martius
Detroit, Michigan 48226
313-227-2395 Direct
248-760-8218 Mobile
313-227-7300
james.korotney@compuware.com



"Gunnar Wagenknecht" <gunnar@wagenknecht.org> wrote in message =
news:g54ie7$q3f$1@build.eclipse.org...
> Hi,
>=20
> Korotney, James schrieb:
>=20
>> I am using the servletbridge. I can see my=20
>> org.eclipse.equinox.http.registry.servlets registered servlets fine,=20
>> both in a jetty container as well as in Tomcat launched within =
eclipse=20
>> as a Java application. But, I can not see any httpContexts =
registered=20
>> under the extension point=20
>=20
>> [...] In jetty, I can only access my servlets directly.
>=20
> > This works:
> >
> > http://localhost/myServlet?foo=3Dbar
> >
> > ****This does not work:
> >
> > http://localhost/myWebAppContext/myServlet?foo=3Dbar
> >
>=20
> Although the OSGi HttpContext "maps" one-on-one onto a ServletContext =
it=20
> has no influence on the URL of the servlets like the ServletContext.
>=20
> In OSGi, every alias defined is applied to the root of the =
HttpService.=20
> Note, the root of the embedded Jetty based HttpService is the real =
root=20
> ("http://server/") whereas the root of the ServletBridge based=20
> HttpService is the web application root.
>=20
>=20
> > Plugin.xml:
> >
> > <plugin>
> > <extension =
point=3D"org.eclipse.equinox.http.registry.httpcontexts">
> > <httpcontext
> > name=3D"myWebAppContext"
> > path=3D"/myWebAppContext ">
> > </httpcontext>
> > </extension>
>=20
> Please check the documentation. There is no "path" element. Also the=20
> "name" element has never made it into API.
>=20
> =
http://help.eclipse.org/ganymede/index.jsp?topic=3D/org.ecli pse.platform.=
doc.isv/reference/extension-points/org_eclipse_equinox_http_ registry_http=
contexts.html
>=20
>=20
> -Gunnar
>=20
> --=20
> Gunnar Wagenknecht
> gunnar@wagenknecht.org
> http://wagenknecht.org/
------=_NextPart_000_003F_01C8E273.22657510
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16674" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff background=3D"">
<DIV><FONT face=3DArial size=3D2>Relevant to my incorrect extension =
point usage -=20
sorry - I originally went from the documented extension point reference, =
but=20
then was messing around based on a clearly out-of-date posting somewhere =

else.&nbsp; Corrected plugin.xml below.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I had a hard time find decent =
documentation or=20
examples, including looking that the OSGi spec and the org.osgi.* =
javadoc.&nbsp;=20
I was about to start looking at internal source to see what was going =
on, but I=20
then you (Gunner)&nbsp;responded...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>What you are telling me (as I =
understand it) is=20
surprising.&nbsp;&nbsp;I would have expected the implementation to proxy =
certain=20
information - such as my query to get the containing web app context =
within the=20
Servlet service via <FONT size=3D2></DIV>
<P>&nbsp;&nbsp;&nbsp; HttpServletRequest.<FONT=20
size=3D2>getSession().getServletContext().getServletContextName(); </FONT>=
</P>
<P><FONT size=3D2>Alas, this only returns null, either within the =
equinox=20
embedded&nbsp;Jetty or a Tomcat container (even though the URL works=20
correctly).</FONT></P>
<P><FONT size=3D2>Would this be considered a bug in the =
implementation?&nbsp; If=20
not, the osgi docs, nor the extension point documentation makes clear =
what you=20
seem to be implying - that the context of the container is unknown to =
the=20
extensions.&nbsp; Also, there is not clear communication that the =
servletContext=20
is not fully proxied... or I am simply missing that=20
explanation.</FONT></FONT></FONT></P>
<DIV><FONT face=3DArial size=3D2>As for now, my approach is to&nbsp;pass =
in an init=20
param on my servlet extension point&nbsp;to take care of identifying the =

container web app context (which i do not like too much, but at least it =
is=20
specified in the same plugin.xml where I would have specified the =
httpcontext=20
via the org.eclipse.equinox.http.registry.httpcontexts extension =
point).&nbsp;=20
Any suggestions otherwise?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thank you for any and all =
help!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>plugin.xml</FONT></DIV>
<DIV>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;=20
&lt;plugin&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&lt;extension</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; id=3D"cwinfocenter"</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; name=3D"cwinfocenter"</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;=20
point=3D"org.eclipse.equinox.http.registry.httpcontexts"&gt; </FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &lt;httpcontext</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; id=3D"cwinfocenter"&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;resource-mapping=20
path=3D"/web-content"/&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &lt;/httpcontext&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&lt;/extension&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2></FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&lt;extension</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; id=3D"contextInfoServlet"</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; name=3D"contextInfoServlet"</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp;=20
point=3D"org.eclipse.equinox.http.registry.servlets"&gt; </FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &lt;servlet</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
class=3D"com.compuware.frameworks.viz.help.cshprovider.CSHServlet "</FONT>=
</P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; alias=3D"/contextInfo"</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
httpcontextId=3D"cwinfocenter"</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
load-on-startup=3D"true"&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&lt;init-param</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
name=3D"webAppContext"</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
value=3D"cwinfocenter"&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&lt;/init-param&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial=20
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
&lt;/servlet&gt;</FONT></P>
<P align=3Dleft><FONT face=3DArial=20
size=3D2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/extension&gt; </FONT></P=
>
<P><FONT face=3DArial size=3D2>&lt;/plugin&gt;</FONT></P><FONT =
face=3DArial size=3D2>
<P class=3DMsoNormal=20
style=3D"MARGIN: 0in 0in 0pt; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: auto"><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; =
mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: =
minor-fareast; mso-no-proof: yes">Regards,</SPAN><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; =
mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: =
minor-fareast; mso-no-proof: yes">=20
<BR></SPAN><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'; =
mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: =
minor-fareast; mso-no-proof: yes">James</SPAN><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; =
mso-fareast-font-family: 'Times New Roman'; mso-fareast-theme-font: =
minor-fareast; mso-no-proof: yes">=20
<?xml:namespace prefix =3D o ns =3D =
"urn:schemas-microsoft-com:office:office"=20
/><o:p></o:p></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><I><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'; =
mso-fareast-theme-font: minor-fareast; mso-no-proof: =
yes">--</SPAN></I><SPAN=20
style=3D"mso-fareast-font-family: 'Times New Roman'; =
mso-fareast-theme-font: minor-fareast; mso-no-proof: yes"><FONT=20
size=3D3><FONT face=3DCalibri> <o:p></o:p></FONT></FONT></SPAN></P>
<P class=3DMsoNormal style=3D"MARGIN: 0in 0in 0pt"><FONT =
face=3DCalibri><SPAN=20
style=3D"FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; =
mso-fareast-theme-font: minor-fareast; mso-no-proof: yes">James=20
Korotney<BR>Technical Consultant, Technical Architecture<BR></SPAN><B=20
style=3D"mso-bidi-font-weight: normal"><SPAN=20
style=3D"FONT-SIZE: 10pt; mso-fareast-font-family: 'Times New Roman'; =
mso-fareast-theme-font: minor-fareast; mso-no-proof: =
yes">Compuware</SPAN></B></FONT><SPAN=20
style=3D"FONT-SIZE: 9pt; mso-fareast-font-family: 'Times New Roman'; =
mso-fareast-theme-font: minor-fareast; mso-no-proof: yes"><BR><FONT=20
face=3DCalibri>One Campus Martius<BR>Detroit, Michigan =
48226<BR>313-227-2395=20
Direct<BR>248-760-8218 Mobile<BR>313-227-7300<BR></FONT><A=20
href=3D"mailto:john.smith@compuware.com"><SPAN=20
style=3D"COLOR: #4071b4; TEXT-DECORATION: none; mso-bidi-font-size: =
11.0pt; text-underline: none"><FONT=20
face=3DCalibri>james.korotney@compuware.com</FONT></SPAN></A></SPAN><SPAN=
=20
style=3D"mso-fareast-font-family: 'Times New Roman'; =
mso-fareast-theme-font: minor-fareast; mso-no-proof: =
yes"><o:p></o:p></SPAN></P><BR><BR>"Gunnar=20
Wagenknecht" &lt;gunnar@wagenknecht.org&gt; wrote in message=20
news:g54ie7$q3f$1@build.eclipse.org...<BR>&gt; Hi,<BR>&gt; <BR>&gt; =
Korotney,=20
James schrieb:<BR>&gt; <BR>&gt;&gt; I am using the servletbridge.&nbsp; =
I can=20
see my <BR>&gt;&gt; org.eclipse.equinox.http.registry.servlets =
registered=20
servlets fine, <BR>&gt;&gt; both in a jetty container as well as in =
Tomcat=20
launched within eclipse <BR>&gt;&gt; as a Java application.&nbsp; But, I =
can not=20
see any httpContexts registered <BR>&gt;&gt; under the extension point =
<BR>&gt;=20
<BR>&gt;&gt; [...] In jetty, I can only access my servlets =
directly.<BR>&gt;=20
<BR>&gt; &gt; This works:<BR>&gt; &gt;<BR>&gt; &gt;=20
http://localhost/myServlet?foo=3Dbar<BR>&gt; &gt;<BR>&gt; &gt; ****This =
does not=20
work:<BR>&gt; &gt;<BR>&gt; =
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;=20
http://localhost/myWebAppContext/myServlet?foo=3Dbar<BR>&gt; =
&gt;<BR>&gt; <BR>&gt;=20
Although the OSGi HttpContext "maps" one-on-one onto a ServletContext it =

<BR>&gt; has no influence on the URL of the servlets like the=20
ServletContext.<BR>&gt; <BR>&gt; In OSGi, every alias defined is applied =
to the=20
root of the HttpService. <BR>&gt; Note, the root of the embedded Jetty =
based=20
HttpService is the real root <BR>&gt; ("http://server/") whereas the =
root of the=20
ServletBridge based <BR>&gt; HttpService is the web application =
root.<BR>&gt;=20
<BR>&gt; <BR>&gt; &gt; Plugin.xml:<BR>&gt; &gt;<BR>&gt; &gt;=20
&lt;plugin&gt;<BR>&gt; &gt;&nbsp;&nbsp;&nbsp; &lt;extension=20
point=3D"org.eclipse.equinox.http.registry.httpcontexts"&gt; <BR>&gt;=20
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;httpcontext<BR>&gt;=20
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb s=
p;=20
name=3D"myWebAppContext"<BR>&gt;=20
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb s=
p;=20
path=3D"/myWebAppContext "&gt;<BR>&gt;=20
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;=20
&lt;/httpcontext&gt;<BR>&gt;=20
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&a mp;nbsp;&nbsp;&nbsp; =
&lt;/extension&gt;<BR>&gt;=20
<BR>&gt; Please check the documentation. There is no "path" element. =
Also the=20
<BR>&gt; "name" element has never made it into API.<BR>&gt; <BR>&gt;=20
http://help.eclipse.org/ganymede/index.jsp?topic=3D/org.ecli pse.platform.=
doc.isv/reference/extension-points/org_eclipse_equinox_http_ registry_http=
contexts.html<BR>&gt;=20
<BR>&gt; <BR>&gt; -Gunnar<BR>&gt; <BR>&gt; -- <BR>&gt; Gunnar=20
Wagenknecht<BR>&gt; gunnar@wagenknecht.org<BR>&gt;=20
http://wagenknecht.org/</FONT></DIV></BODY></HTML>

------=_NextPart_000_003F_01C8E273.22657510--
Re: httpContext extension point not working, but servlet extension point is? [message #113878 is a reply to message #113865] Thu, 10 July 2008 14:43 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

James Korotney schrieb:
> HttpServletRequest.getSession().getServletContext().getServl etContextName();
>
> Alas, this only returns null, either within the equinox embedded Jetty
> or a Tomcat container (even though the URL works correctly).

According to the spec of ServletContext#getServletContextName() [1] null
is the expected return value if no display-name element is declared in
the deployment descriptor of the web application.

As there is no web application there is also no deployment descriptor.
Therefore, there will also be no display-name element.

[1]
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ ServletContext.html#getServletContextName()

> [...] Also, there is not clear communication that the
> servletContext is not fully proxied... or I am simply missing that
> explanation.

Do you have a pointer to the source that states it should be proxied?
It's the first time I hear of it.

> Any suggestions otherwise?

I think it's a reasonable request to have the servlet bridge provide
this information from the web application it's running in. You may want
to open an enhancement request for this. However, you application code
should be prepared to receive a null response if running with the
embedded Jetty based HttpService.

-Gunnar

--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
Re: httpContext extension point not working, but servlet extension point is? [message #113892 is a reply to message #113878] Thu, 10 July 2008 14:48 Go to previous message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Gunnar Wagenknecht schrieb:
> As there is no web application there is also no deployment descriptor.
> Therefore, there will also be no display-name element.

Note, this statement is targeted at the OSGi world (HttpService). Of
course, the servlet bridge runs _in_ a web application.

-Gunnar

--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
Previous Topic:alternative to the nevada update site?
Next Topic:Error mirroring update site
Goto Forum:
  


Current Time: Fri Apr 26 09:39:33 GMT 2024

Powered by FUDForum. Page generated in 0.03438 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top