Skip to content

Commit d486c0e

Browse files
authored
Add files via upload
1 parent 3d6b5d5 commit d486c0e

7 files changed

Lines changed: 287 additions & 0 deletions

File tree

pom.xml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>com.mt</groupId>
6+
<artifactId>maven-web-application</artifactId>
7+
<packaging>war</packaging>
8+
<version>0.0.1-SNAPSHOT</version>
9+
10+
<name>maven-web-application</name>
11+
12+
<description>Maven Web Project for Java Project</description>
13+
14+
<organization>
15+
<name>Landmark Technologies</name>
16+
<url>http://landmarktechnologies.com/</url>
17+
</organization>
18+
19+
<properties>
20+
<jdk.version>1.8</jdk.version>
21+
<spring.version>5.1.2.RELEASE</spring.version>
22+
<junit.version>4.11</junit.version>
23+
<log4j.version>1.2.17</log4j.version>
24+
<sonar.host.url>http:172.31.27.227:9000/</sonar.host.url>
25+
<sonar.login>admin</sonar.login>
26+
<sonar.password>admin@123</sonar.password>
27+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
28+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
29+
30+
</properties>
31+
32+
<dependencies>
33+
34+
<dependency>
35+
<groupId>org.json</groupId>
36+
<artifactId>json</artifactId>
37+
<version>20160212</version>
38+
</dependency>
39+
40+
<!-- test dependencies -->
41+
<dependency>
42+
<groupId>junit</groupId>
43+
<artifactId>junit</artifactId>
44+
<version>3.8.1</version>
45+
<scope>test</scope>
46+
</dependency>
47+
48+
<dependency>
49+
<groupId>javax.servlet</groupId>
50+
<artifactId>javax.servlet-api</artifactId>
51+
<version>3.1.0</version>
52+
<scope>provided</scope>
53+
</dependency>
54+
55+
<dependency>
56+
<groupId>org.mockito</groupId>
57+
<artifactId>mockito-core</artifactId>
58+
<version>1.9.5</version>
59+
<scope>test</scope>
60+
</dependency>
61+
62+
<!-- compile dependencies -->
63+
64+
<dependency>
65+
<groupId>org.springframework</groupId>
66+
<artifactId>spring-core</artifactId>
67+
<version>${spring.version}</version>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.springframework</groupId>
71+
<artifactId>spring-web</artifactId>
72+
<version>${spring.version}</version>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.springframework</groupId>
76+
<artifactId>spring-webmvc</artifactId>
77+
<version>${spring.version}</version>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.springframework</groupId>
81+
<artifactId>spring-context</artifactId>
82+
<version>${spring.version}</version>
83+
</dependency>
84+
85+
<!-- provided dependencies -->
86+
87+
<dependency>
88+
<groupId>javax.servlet</groupId>
89+
<artifactId>javax.servlet-api</artifactId>
90+
<version>3.1.0</version>
91+
<scope>provided</scope>
92+
</dependency>
93+
94+
</dependencies>
95+
96+
<distributionManagement>
97+
<repository>
98+
<id>nexus</id>
99+
<name>Landmark Technologies Releases Nexus Repository</name>
100+
<url> http://172.31.18.29:8081/repository/ebay-bts-releases/</url>
101+
</repository>
102+
103+
<snapshotRepository>
104+
<id>nexus</id>
105+
<name>Landmark Technologies Snapshot Nexus Repository </name>
106+
<url>http://172.31.18.29:8081/repository/ebay-bts-snapshot/</url>
107+
</snapshotRepository>
108+
109+
</distributionManagement>
110+
111+
<build>
112+
<finalName>web-app</finalName>
113+
114+
<plugins>
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-compiler-plugin</artifactId>
118+
<version>3.3</version>
119+
<configuration>
120+
<source>${jdk.version}</source>
121+
<target>${jdk.version}</target>
122+
</configuration>
123+
</plugin>
124+
125+
<plugin>
126+
<groupId>org.eclipse.jetty</groupId>
127+
<artifactId>jetty-maven-plugin</artifactId>
128+
<version>9.2.11.v20150529</version>
129+
<configuration>
130+
<scanIntervalSeconds>10</scanIntervalSeconds>
131+
<webApp>
132+
<contextPath>/maven-web-application</contextPath>
133+
</webApp>
134+
</configuration>
135+
</plugin>
136+
137+
<plugin>
138+
<groupId>org.apache.maven.plugins</groupId>
139+
<artifactId>maven-eclipse-plugin</artifactId>
140+
<version>2.9</version>
141+
<configuration>
142+
<downloadSources>true</downloadSources>
143+
<downloadJavadocs>true</downloadJavadocs>
144+
<wtpversion>2.0</wtpversion>
145+
<wtpContextName>maven-web-application</wtpContextName>
146+
</configuration>
147+
</plugin>
148+
149+
</plugins>
150+
</build>
151+
152+
153+
</project>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.mt.services;
2+
3+
import javax.servlet.http.HttpServletRequest;
4+
import javax.servlet.http.HttpServletResponse;
5+
import javax.servlet.http.HttpSession;
6+
7+
import org.json.JSONException;
8+
import org.json.JSONObject;
9+
import org.springframework.stereotype.Controller;
10+
import org.springframework.web.bind.annotation.RequestMapping;
11+
import org.springframework.web.bind.annotation.RequestMethod;
12+
import org.springframework.web.bind.annotation.ResponseBody;
13+
14+
@Controller
15+
@RequestMapping("/employee")
16+
public class EmployeeService {
17+
18+
19+
@RequestMapping(value = "/getEmployeeDetails", method = RequestMethod.GET)
20+
@ResponseBody
21+
String uploadImage(HttpServletRequest request, HttpServletResponse response, HttpSession httpSession)
22+
throws JSONException {
23+
24+
JSONObject js = new JSONObject();
25+
js.put("Name", "Landmark Technologies");
26+
js.put("Calling Name", "Landmark");
27+
js.put("DOB", "08-Nov-2011");
28+
js.put("Hobbies", "Reading Technical Blogs,Teaching, Changing lives..");
29+
js.put("Places he like", "Africa, Church, His native place");
30+
31+
return js.toString();
32+
}
33+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<beans xmlns="http://www.springframework.org/schema/beans"
4+
xmlns:context="http://www.springframework.org/schema/context"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
6+
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
7+
xmlns:task="http://www.springframework.org/schema/task"
8+
xsi:schemaLocation="
9+
http://www.springframework.org/schema/beans
10+
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
11+
http://www.springframework.org/schema/context
12+
http://www.springframework.org/schema/context/spring-context-3.0.xsd
13+
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
14+
http://www.springframework.org/schema/jee
15+
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
16+
http://www.springframework.org/schema/tx
17+
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
18+
http://www.springframework.org/schema/task
19+
http://www.springframework.org/schema/task/spring-task.xsd">
20+
21+
<context:component-scan base-package="com.mt.*"></context:component-scan>
22+
23+
<mvc:annotation-driven></mvc:annotation-driven>
24+
25+
26+
</beans>

src/main/webapp/WEB-INF/web.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
3+
<display-name>maven-web-application</display-name>
4+
<context-param>
5+
<param-name>contextConfigLocation</param-name>
6+
<param-value>/WEB-INF/mt-servlet.xml</param-value>
7+
</context-param>
8+
<servlet>
9+
<servlet-name>mt</servlet-name>
10+
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
11+
<load-on-startup>1</load-on-startup>
12+
</servlet>
13+
<servlet-mapping>
14+
<servlet-name>mt</servlet-name>
15+
<url-pattern>/services/*</url-pattern>
16+
</servlet-mapping>
17+
<listener>
18+
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
19+
</listener>
20+
<welcome-file-list>
21+
<welcome-file>/jsps/home.jsp</welcome-file>
22+
</welcome-file-list>
23+
</web-app>
10.7 KB
Loading
110 KB
Loading

src/main/webapp/jsps/home.jsp

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
2+
<%@ page import="java.net.*" %>
3+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4+
<html>
5+
<head>
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>LandmarkTechnologies- Home Page</title>
8+
<link href="images/mylandmarklogo.png" rel="icon">
9+
</head>
10+
</head>
11+
<body>
12+
<h1 align="center">Welcome to Landmark Software Solutions, Virginia, USA Office.</h1>
13+
<h1 align="center">We are developing and supporting quality Software Solutions to millions of clients.
14+
We offer Training for DevOps with Linux and Cloud equipping IT Engineers for best performance.</h1>
15+
<hr>
16+
<br>
17+
<h1><h3> Server Side IP Address </h3><br>
18+
19+
<%
20+
String ip = "";
21+
InetAddress inetAddress = InetAddress.getLocalHost();
22+
ip = inetAddress.getHostAddress();
23+
out.println("Server Host Name :: "+inetAddress.getHostName());
24+
%>
25+
<br>
26+
<%out.println("Server IP Address :: "+ip);%>
27+
28+
</h1>
29+
30+
<hr>
31+
<div style="text-align: center;">
32+
<span>
33+
<img src="images/mylandmarklogo.png" alt="" width="150">
34+
</span>
35+
<span style="font-weight: bold;">
36+
Landmark Technology,
37+
Toronto, Ontario, Canada
38+
+1 437 215 2483,
39+
mylandmarktech@gmail.com
40+
<br>
41+
<a href="mailto:mylandmarktech@gmail.com">Mail to Landmark Technologies</a>
42+
</span>
43+
</div>
44+
<hr>
45+
<p> Service : <a href="services/employee/getEmployeeDetails">Get Employee Details </p>
46+
<hr>
47+
<hr>
48+
<p align=center>Landmark Technologies - Consultant, Training and Software Development</p>
49+
<p align=center><small>Copyrights 2021 by <a href="http://mylandmarktech.com/">Landmark Technologies</a> </small></p>
50+
51+
</body>
52+
</html>

0 commit comments

Comments
 (0)