gpstest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
package com.nru.test;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
* Servlet implementation class ignitionreport
*/
public class ignitionreport extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public ignitionreport() {
super();
// TODO Auto-generated constructor stub
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String method = "GET";
myAction(request, response, method);
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String method = "POST";
myAction(request, response, method);
}
public void myAction(HttpServletRequest request, HttpServletResponse response, String method) throws ServletException, IOException {
HttpSession session = request.getSession();
if(session.getAttribute("email") == null){
System.out.println("-->"+method+": 1");
request.getRequestDispatcher("index.jsp").forward(request, response);
}else{
System.out.println("-->"+method+": 2");
request.getRequestDispatcher("ignitionreport.jsp").forward(request, response);
}
}
}
|
Revision |
Author |
Commited |
Message |
1
|
lingaraj
|
Sat 24 Nov, 2018 13:04:59 +0000 |
|