forked from siqq/Java-Missle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
155 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="WebContent"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> | ||
<attributes> | ||
<attribute name="hide" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> | ||
<classpathentry kind="output" path=""/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.7 | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> | ||
<wb-module deploy-name="Java-Missle"> | ||
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/> | ||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> | ||
<property name="context-root" value="Java-Missle"/> | ||
<property name="java-output-path" value="/Java-Missle/bin"/> | ||
</wb-module> | ||
</project-modules> |
7 changes: 7 additions & 0 deletions
7
Java-Missle/.settings/org.eclipse.wst.common.project.facet.core.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faceted-project> | ||
<fixed facet="wst.jsdt.web"/> | ||
<installed facet="java" version="1.8"/> | ||
<installed facet="jst.web" version="3.0"/> | ||
<installed facet="wst.jsdt.web" version="1.0"/> | ||
</faceted-project> |
1 change: 1 addition & 0 deletions
1
Java-Missle/.settings/org.eclipse.wst.jsdt.ui.superType.container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="windows-1255"> | ||
<title>IDF CONTROL</title> | ||
</head> | ||
<body> | ||
<form method="get" action="IdfControlServlet"> | ||
Enter Iron Dome ID <br> | ||
<input type="text" name="ironDomeId" /></br> | ||
Enter Missile ID to Intercept: <br> | ||
<input type="text" name="missileId" /></br> | ||
<br> | ||
<input type="submit" name="interceptMissile" value="interceptMissile"><br> | ||
<br> | ||
<br> | ||
Select Destroyer Type <br> | ||
<input type="radio" name="destroyerType" value="plane">Plane<br> | ||
<input type="radio" name="destroyerType" value="ship">Ship<br> | ||
<br> | ||
Enter Destroyer ID<br> | ||
<input type="text" name="destroyerId" /></br> | ||
<br> | ||
Enter Launcher ID to Destroy<br> | ||
<input type="text" name="launcherId" /></br> | ||
<br> | ||
<input type="submit" name="destroyLauncher" value="destroyLauncher" /> | ||
</form> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package servlet; | ||
import java.io.IOException; | ||
import java.io.PrintWriter; | ||
import java.util.List; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.annotation.WebServlet; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import war.controller.WarUIEventsListener; | ||
import main.Program; | ||
|
||
@WebServlet(name = "IdfControlServlet", urlPatterns = { "/IdfControlServlet" }) | ||
public class IdfControlServlet extends HttpServlet { | ||
private static final long serialVersionUID = 1L; | ||
|
||
|
||
protected void doGet(HttpServletRequest request, | ||
HttpServletResponse response) throws ServletException, IOException { | ||
|
||
response.setContentType("text/html;charset=UTF-8"); | ||
PrintWriter out = response.getWriter(); | ||
|
||
// interceptMissile button was clicked | ||
if (request.getParameter("interceptMissile") != null){ | ||
String ironDomeId = request.getParameter("ironDomeId"); | ||
String missileId = request.getParameter("missileId"); | ||
// do something | ||
try { | ||
out.println("<html>"); | ||
out.println("<h1>destroyLauncher button clicked</h1>"); | ||
out.println("</html>"); | ||
// for (WarUIEventsListener l : allListeners) { | ||
// l.addInterceptionToUI(missileId, ironDomeId); | ||
// } | ||
} finally { | ||
out.close(); | ||
} | ||
} | ||
|
||
|
||
// destroyLauncher button was clicked | ||
else if (request.getParameter("destroyLauncher") != null){ | ||
// do something | ||
try { | ||
out.println("<html>"); | ||
out.println("<h1>destroyLauncher button clicked</h1>"); | ||
out.println("</html>"); | ||
} finally { | ||
out.close(); | ||
} | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
} | ||
|
||
protected void doPost(HttpServletRequest request, | ||
HttpServletResponse response) throws ServletException, IOException { | ||
doGet(request, response); | ||
} | ||
} |