User: starksm 
  Date: 02/02/20 23:02:36

  Added:       src/resources/web/html/jbosstest/restricted ejb.jsp
                        include_ejb.jsp
  Log:
  Add multiple wars to test mapping of the context-root
  
  Revision  Changes    Path
  1.1                  jbosstest/src/resources/web/html/jbosstest/restricted/ejb.jsp
  
  Index: ejb.jsp
  ===================================================================
  <%@page contentType="text/html"
     import="javax.naming.*,org.jboss.test.web.interfaces.*"
  %>
  <%!
  
     private String callEJB(String arg) throws ServletException
     {
        String value = null;
        try
        {
           InitialContext ctx = new InitialContext();
           Object ref = ctx.lookup("java:comp/env/ejb/SecuredEJB");
           StatelessSessionHome home = (StatelessSessionHome) ref;
           StatelessSession bean = home.create();
           String echoValue = bean.echo(arg);
           value = "SecuredEJB.echo("+arg+") returned: "+echoValue;
        }
        catch(Exception e)
        {
           throw new ServletException(e);
        }
        return value;
     }
  %>
  
  <html>
  <head><title>JSP to EJB Test</title></head>
  <body>
  
  <h1>JSP to EJB Test</h1>
  <%
     String arg = request.getParameter("name");
     String reply = callEJB(arg);
     out.println(reply);
     out.flush();
  %>
  
  </body>
  </html>
  
  
  
  1.1                  
jbosstest/src/resources/web/html/jbosstest/restricted/include_ejb.jsp
  
  Index: include_ejb.jsp
  ===================================================================
  <%@page contentType="text/html"%>
  
  <html>
  <head><title>JSP Include ejb.jsp Test</title></head>
  <body>
  
  <jsp:include page="ejb.jsp"  flush="true">
     <jsp:param name="name" value="d1"/> 
  </jsp:include>
  <jsp:include page="ejb.jsp"  flush="true">
     <jsp:param name="name" value="d2"/> 
  </jsp:include>
  <jsp:include page="ejb.jsp"  flush="true">
     <jsp:param name="name" value="d3"/> 
  </jsp:include>
  <jsp:include page="ejb.jsp"  flush="true">
     <jsp:param name="name" value="d4"/> 
  </jsp:include>
  
  </body>
  </html>
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to