Refactor Servlet example
This commit is contained in:
parent
9c27508cf9
commit
c75a9864f8
|
@ -7,6 +7,18 @@
|
||||||
<groupId>com.root</groupId>
|
<groupId>com.root</groupId>
|
||||||
<artifactId>ServletmavenExample</artifactId>
|
<artifactId>ServletmavenExample</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>1.7</source>
|
||||||
|
<target>1.7</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class FormServletTest {
|
||||||
HttpClient client = new DefaultHttpClient();
|
HttpClient client = new DefaultHttpClient();
|
||||||
HttpPost method = new HttpPost("http://localhost:8080/calculateServlet");
|
HttpPost method = new HttpPost("http://localhost:8080/calculateServlet");
|
||||||
|
|
||||||
List<BasicNameValuePair> nvps = new ArrayList<BasicNameValuePair>();
|
List<BasicNameValuePair> nvps = new ArrayList<>();
|
||||||
nvps.add(new BasicNameValuePair("height", String.valueOf(2)));
|
nvps.add(new BasicNameValuePair("height", String.valueOf(2)));
|
||||||
nvps.add(new BasicNameValuePair("weight", String.valueOf(80)));
|
nvps.add(new BasicNameValuePair("weight", String.valueOf(80)));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue