Commit ed44256f authored by Bc. Edvard Rejthar's avatar Bc. Edvard Rejthar

bugs

parent f731fa81
......@@ -81,12 +81,12 @@ public class DestinationResource {
in.close();
//zpracovat dosly JSON
System.out.println("hulvat");
System.out.println("Google API response:");
System.out.println(response.toString());
JsonParser parser = new JsonParser();
System.out.println("Testab");
JsonObject rootObj = parser.parse(response.toString()).getAsJsonObject();
System.out.println("Testab");
JsonObject rootObj = parser.parse(response.toString()).getAsJsonObject();
System.out.println(rootObj);
JsonObject locObj = rootObj.getAsJsonArray("results").get(0).getAsJsonObject().getAsJsonObject("geometry").getAsJsonObject("location");
String status = rootObj.get("status").getAsString();
......
......@@ -8,6 +8,25 @@
</property>
</jsp-config>
<security-role-mapping> <role-name>admin</role-name> <principal-name>b</principal-name> </security-role-mapping>
<security-role-mapping>
<role-name>admin</role-name>
<principal-name>b</principal-name>
</security-role-mapping>
<security-role-mapping>
<role-name>admin</role-name>
<principal-name>test</principal-name>
</security-role-mapping>
<security-role-mapping>
<role-name>admin</role-name>
<principal-name>admin</principal-name>
</security-role-mapping>
<security-role-mapping>
<role-name>admin</role-name>
<principal-name>manager</principal-name>
</security-role-mapping>
<security-role-mapping>
<role-name>admin</role-name>
<principal-name>a</principal-name>
</security-role-mapping>
</glassfish-web-app>
\ No newline at end of file
......@@ -38,6 +38,19 @@ see implementation details http://jersey.java.net/nonav/documentation/latest/jax
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>AdminFlight</web-resource-name>
<url-pattern>/source/flight/*</url-pattern>
<http-method>DELETE</http-method>
<http-method>PUT</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<servlet-mapping>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment