Hi all,

its possible to install more than one servlet from one *.war archive?
I've two servlets (extends HttpServlet) in my jahia-hello.war archive and only one works in Jahia environment.

In my web.xml-file we can find the follow entries:

    <display-name>jahia-hello</display-name>

    <servlet>
      ...
      <servlet-name>JahiaAttributesA</servlet-name>
      <servlet-class>portal.JahiaAttributesA</servlet-class>
    </servlet>

    <servlet>
      ...
      <servlet-name>JahiaAttributesB</servlet-name>
      <servlet-class>portal.JahiaAttributesB</servlet-class>
    </servlet>

    <servlet-mapping>
      <servlet-name>JahiaAttributesA</servlet-name>
      <url-pattern>/attributesA</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
      <servlet-name>JahiaAttributesB</servlet-name>
      <url-pattern>/attributesB</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      ...
    </welcome-file-list>

Outside from Jahia both servlets works fine with URL's
   .../jahia-hello/attributesA  and
   .../jahia-hello/attributesB  and

To register in Jahia I use jahia.xml:

  <entrypoints>
    <entrypoint>
      <name>JahiaAttributesA</name>
      <display-name>attributesA</display-name>
      <target type="servlet-name">portal.JahiaAttributesA</target>
    </entrypoint>

    <entrypoint>
      <name>JahiaAttributesB</name>
      <display-name>attributesB</display-name>
      <target type="servlet-name">portal.JahiaAttributesB</target>
    </entrypoint>
  </entrypoints>

Both servlets are visible in administration console and I can install it as webapplications in edit-mode.

Because in "index.jsp" we find the entries

<%@ page language="java" %>
<jsp:forward page="/attributesA" />

(which forwards to ONE servlet) only ONE servlet works in Jahia environment.

Its possible to eliminate the "index.jsp"? Where I must configure Jahia to have, that Jahia requests .../jahia-hello/attributesA and .../jahia-hello/attributesB independent from "index.jsp"?

The aim is to have more than one servlet from one *.war archive in my portal.

Best regards,
Thomas Pich


Reply via email to