-
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
1 parent
62f010c
commit 276d528
Showing
18 changed files
with
256 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"> | ||
<attributes> | ||
<attribute name="owner.project.facets" value="java"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/> | ||
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/> | ||
<classpathentry kind="lib" path="servlet-api.jar"/> | ||
<classpathentry kind="output" path="build/classes"/> | ||
</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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>ajaxapp1</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
</natures> | ||
</projectDescription> |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 | ||
org.eclipse.jdt.core.compiler.compliance=1.6 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.6 |
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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project-modules id="moduleCoreId" project-version="1.5.0"> | ||
<wb-module deploy-name="ajaxapp1"> | ||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/> | ||
<wb-resource deploy-path="/" source-path="/ajaxapp"/> | ||
<property name="java-output-path" value="/ajaxapp1/build/classes"/> | ||
<property name="context-root" value="ajaxapp1"/> | ||
</wb-module> | ||
</project-modules> |
9 changes: 9 additions & 0 deletions
9
ajaxapp1/.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,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faceted-project> | ||
<fixed facet="java"/> | ||
<fixed facet="wst.jsdt.web"/> | ||
<fixed facet="jst.web"/> | ||
<installed facet="java" version="1.6"/> | ||
<installed facet="jst.web" version="3.0"/> | ||
<installed facet="wst.jsdt.web" version="1.0"/> | ||
</faceted-project> |
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,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns:web="http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> | ||
<servlet> | ||
<servlet-name>fs</servlet-name> | ||
<servlet-class>org.errichen.FirstServlet</servlet-class> | ||
</servlet> | ||
<servlet> | ||
<servlet-name>ajax</servlet-name> | ||
<servlet-class>org.errichen.AjaxServlet</servlet-class> | ||
</servlet> | ||
<servlet-mapping> | ||
<servlet-name>ajax</servlet-name> | ||
<url-pattern>/ajax</url-pattern> | ||
</servlet-mapping> | ||
<servlet-mapping> | ||
<servlet-name>fs</servlet-name> | ||
<url-pattern>/fs</url-pattern> | ||
</servlet-mapping> | ||
</web-app> |
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,32 @@ | ||
<html> | ||
<head> | ||
<script> | ||
function callAjax(){ | ||
alert('we are in test ajax'); | ||
var url='http://localhost:8500/ajaxapp/ajax?fone=ajax'; | ||
var result; | ||
if (window.XMLHttpRequest) | ||
{ | ||
a=new XMLHttpRequest(); | ||
} | ||
else | ||
{ | ||
a=new ActiveXObject("Microsoft.XMLHTTP"); | ||
} | ||
a.onreadystatechange=function(){ | ||
if (a.readyState==4){ | ||
result=a.responseText; | ||
} | ||
}; | ||
a.open("POST",url,false); | ||
a.send(); | ||
alert(result); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<form name="ajaxapp" action="/ajaxapp/fs"> | ||
Give i/p here :<input type="text" name="fone"/> | ||
<input type="submit" value="clickme" onclick="callAjax()"/> | ||
</body> | ||
</html> |
Binary file not shown.
Binary file not shown.
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,32 @@ | ||
<html> | ||
<head> | ||
<script> | ||
function callAjax(){ | ||
alert('we are in test ajax'); | ||
var url='http://localhost:8500/ajaxapp/ajax?fone=ajax'; | ||
var result; | ||
if (window.XMLHttpRequest) | ||
{ | ||
a=new XMLHttpRequest(); | ||
} | ||
else | ||
{ | ||
a=new ActiveXObject("Microsoft.XMLHTTP"); | ||
} | ||
a.onreadystatechange=function(){ | ||
if (a.readyState==4){ | ||
result=a.responseText; | ||
} | ||
}; | ||
a.open("POST",url,false); | ||
a.send(); | ||
alert(result); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<form name="ajaxapp" action="/ajaxapp/fs"> | ||
Give i/p here :<input type="text" name="fone"/> | ||
<input type="submit" value="clickme" onclick="callAjax()"/> | ||
</body> | ||
</html> |
Binary file not shown.
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,29 @@ | ||
package org.errichen; | ||
|
||
import java.io.IOException; | ||
import java.io.PrintWriter; | ||
|
||
import javax.servlet.ServletException; | ||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
|
||
public class AjaxServlet extends HttpServlet { | ||
|
||
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | ||
// TODO Auto-generated method stub | ||
System.out.println("we are in service method of ajax servlet"); | ||
System.out.println(request.getParameter("fone")); | ||
PrintWriter out=null; | ||
try{ | ||
out=response.getWriter(); | ||
out.println("true"); | ||
}catch(Exception exp){ | ||
exp.printStackTrace(); | ||
}finally{ | ||
|
||
} | ||
} | ||
|
||
} |
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,21 @@ | ||
package org.errichen; | ||
|
||
import java.io.PrintWriter; | ||
|
||
import javax.servlet.http.HttpServlet; | ||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
public class FirstServlet extends HttpServlet { | ||
public void service(HttpServletRequest request,HttpServletResponse response){ | ||
System.out.println("we are in first servlet request object"); | ||
PrintWriter out=null; | ||
try{ | ||
out=response.getWriter(); | ||
out.println("we are in first servlet"); | ||
}catch(Exception exp){ | ||
exp.printStackTrace(); | ||
}finally{ | ||
} | ||
} | ||
} |
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,32 @@ | ||
<html> | ||
<head> | ||
<script> | ||
function callAjax(){ | ||
alert('we are in test ajax'); | ||
var url='http://localhost:8500/ajaxapp/ajax?fone=ajax'; | ||
var result; | ||
if (window.XMLHttpRequest) | ||
{ | ||
a=new XMLHttpRequest(); | ||
} | ||
else | ||
{ | ||
a=new ActiveXObject("Microsoft.XMLHTTP"); | ||
} | ||
a.onreadystatechange=function(){ | ||
if (a.readyState==4){ | ||
result=a.responseText; | ||
} | ||
}; | ||
a.open("POST",url,false); | ||
a.send(); | ||
alert(result); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<form name="ajaxapp" action="/ajaxapp/fs"> | ||
Give i/p here :<input type="text" name="fone"/> | ||
<input type="submit" value="clickme" onclick="callAjax()"/> | ||
</body> | ||
</html> |