Refactor Servlet example

This commit is contained in:
pivovarit 2016-12-10 14:43:26 +01:00
parent 9c27508cf9
commit c75a9864f8
2 changed files with 13 additions and 1 deletions

View File

@ -7,6 +7,18 @@
<groupId>com.root</groupId>
<artifactId>ServletmavenExample</artifactId>
<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>

View File

@ -21,7 +21,7 @@ public class FormServletTest {
HttpClient client = new DefaultHttpClient();
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("weight", String.valueOf(80)));