Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
legah2045 authored Sep 24, 2021
1 parent cf81212 commit 46ac861
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/main/java/com/mt/services/EmployeeService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.mt.services;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.json.JSONException;
import org.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/employee")
public class EmployeeService {


@RequestMapping(value = "/getEmployeeDetails", method = RequestMethod.GET)
@ResponseBody
String uploadImage(HttpServletRequest request, HttpServletResponse response, HttpSession httpSession)
throws JSONException {

JSONObject js = new JSONObject();
js.put("Name", "Landmark Technologies");
js.put("Calling Name", "Landmark");
js.put("DOB", "08-Nov-2011");
js.put("Hobbies", "Reading Technical Blogs,Teaching, Changing lives..");
js.put("Places he like", "Africa, Church, His native place");

return js.toString();
}
}
26 changes: 26 additions & 0 deletions src/main/webapp/WEB-INF/mt-servlet.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task.xsd">

<context:component-scan base-package="com.mt.*"></context:component-scan>

<mvc:annotation-driven></mvc:annotation-driven>


</beans>
23 changes: 23 additions & 0 deletions src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<display-name>maven-web-application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/mt-servlet.xml</param-value>
</context-param>
<servlet>
<servlet-name>mt</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>mt</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<welcome-file-list>
<welcome-file>/jsps/home.jsp</welcome-file>
</welcome-file-list>
</web-app>
Binary file added src/main/webapp/images/mithunlogo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/mylandmarklogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions src/main/webapp/jsps/home.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.net.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LandmarkTechnologies- Home Page</title>
<link href="images/mylandmarklogo.png" rel="icon">
</head>
</head>
<body>
<h1 align="center">Welcome to Landmark Software Solutions, Virginia, USA Office.</h1>
<h1 align="center">We are developing and supporting quality Software Solutions to millions of clients.
We offer Training for DevOps with Linux and Cloud equipping IT Engineers for best performance.</h1>
<hr>
<br>
<h1><h3> Server Side IP Address </h3><br>

<%
String ip = "";
InetAddress inetAddress = InetAddress.getLocalHost();
ip = inetAddress.getHostAddress();
out.println("Server Host Name :: "+inetAddress.getHostName());
%>
<br>
<%out.println("Server IP Address :: "+ip);%>

</h1>

<hr>
<div style="text-align: center;">
<span>
<img src="images/mylandmarklogo.png" alt="" width="150">
</span>
<span style="font-weight: bold;">
Landmark Technology,
Toronto, Ontario, Canada
+1 437 215 2483,
[email protected]
<br>
<a href="mailto:[email protected]">Mail to Landmark Technologies</a>
</span>
</div>
<hr>
<p> Service : <a href="services/employee/getEmployeeDetails">Get Employee Details </p>
<hr>
<hr>
<p align=center>Landmark Technologies - Consultant, Training and Software Development</p>
<p align=center><small>Copyrights 2021 by <a href="http://mylandmarktech.com/">Landmark Technologies</a> </small></p>

</body>
</html>

0 comments on commit 46ac861

Please sign in to comment.