views:

14

answers:

0

First off, my code works perfectly on all app servers except jrun. I have a jsp named trends.jsp. In my web.xml I create multiple instances.

<servlet-name>trendsA</servlet-name>
  <jsp-file>/trends.jsp</jsp-file>
  <init-param>
    <param-name>server</param-name>
      <param-value>serverA</param-value>
  </init-param> 

<servlet-name>trendsB</servlet-name>
  <jsp-file>/trends.jsp</jsp-file>
  <init-param>
    <param-name>server</param-name>
      <param-value>serverB</param-value>
  </init-param> ...

Later I map it.

     <servlet-mapping>
             <servlet-name>trendsA</servlet-name>
             <url-pattern>/exampleA</url-pattern>
    </servlet-mapping>

     <servlet-mapping>
             <servlet-name>trendsB</servlet-name>
             <url-pattern>/exampleB</url-pattern>
    </servlet-mapping>

When I call /trendsA in the browser it returns the correct info when it hits serverA. When I call /trendsB it returns the info from serverA. I print out the server to be sure. If I call /trendsB first, it returns serverB info, but then a call to /trendsA returns serverB info as well. It's like whichever is called first.

I think there may be a jrun setting that is causing this issue but I couldn't find anything on google. Any ideas?

This is how I get server from the init-param in trends.jsp if you are interested.

String server = getServletConfig().getInitParameter("server");