You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Grzegorz Grzybek (Jira)" <ji...@apache.org> on 2023/10/18 16:38:00 UTC
[jira] [Assigned] (KARAF-7774) ServletContext.getServletContextName() returns wrong value
[ https://issues.apache.org/jira/browse/KARAF-7774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grzegorz Grzybek reassigned KARAF-7774:
---------------------------------------
Assignee: Grzegorz Grzybek
> ServletContext.getServletContextName() returns wrong value
> ----------------------------------------------------------
>
> Key: KARAF-7774
> URL: https://issues.apache.org/jira/browse/KARAF-7774
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.4.3
> Reporter: Amichai Rothman
> Assignee: Grzegorz Grzybek
> Priority: Major
>
> The ServletContext.getServletContextName() interface javadoc says:
> {noformat}
> Returns the name of this web application corresponding to this ServletContext as specified in the deployment descriptor for this web application by the display-name element.
> {noformat}
> In my app, I drop into karaf's deploy folder a WAB bundle with a web.xml containing only display-name (human-readable string) and listener-class with a ServletContextListener implementation class name. The listener's contextInitialized method is invoked, but event.getServletContext().getServletContextName() returns what appears to be the context path (e.g. "/") instead of the display name.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)