1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.pluto.portalImpl.portlet.test;
17
18 import java.io.IOException;
19
20 import javax.servlet.RequestDispatcher;
21 import javax.servlet.ServletException;
22 import javax.servlet.http.HttpServlet;
23 import javax.servlet.http.HttpServletRequest;
24 import javax.servlet.http.HttpServletResponse;
25 import javax.servlet.http.HttpSession;
26
27 /***
28 * @author <a href="ddewolf@apache.org">David H. DeWolf</a>
29 */
30 public class ExternalAppScopedAttributeTestCompanionServlet extends HttpServlet {
31
32 public void doGet(HttpServletRequest req, HttpServletResponse res)
33 throws ServletException, IOException {
34
35 HttpSession session = req.getSession();
36 String val = (String)
37 session.getAttribute(ExternalAppScopedAttributeTest.INT_KEY);
38
39 if(ExternalAppScopedAttributeTest.VALUE.equals(val)) {
40 req.setAttribute("passed", new Boolean(true));
41
42 session.setAttribute(
43 ExternalAppScopedAttributeTest.EXT_KEY,
44 ExternalAppScopedAttributeTest.VALUE
45 );
46 }
47
48 RequestDispatcher dis = req.getRequestDispatcher("/jsp/external_app_scoped_test_ext.jsp");
49 dis.forward(req, res);
50
51 }
52 }