Advertisement
Guest User

Untitled

a guest
Apr 29th, 2015
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.  
  2. Запрос:
  3. function doAjaxPost() {
  4.     console.log('start');
  5.     $.ajax({
  6.         type: 'POST',
  7.         url: "genkeys"
  8.         success: console.log('success')
  9.     });
  10.     console.log('stop');
  11. }
  12.  
  13. Сервлет spring:
  14. @RequestMapping(value = "genkeys", method = RequestMethod.POST)
  15. public void genKeys() {
  16.     System.out.println("PRIVATE KEY1111:" + Base64.getEncoder().encodeToString(keyPair.getPrivate().getEncoded()));
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement