0

I am trying to access DynamoDB from my java Web Application using a Servlet, I am unable to connect to dynamodb through this approach. My code works fine if I place it on another .java class and run it as Java Application, in this way I get data from dynamodb and can interact .

Hence my question is: How to connect to it from the web application?

Yurets
  • 3,999
  • 17
  • 54
  • 74
Kejsi Struga
  • 550
  • 6
  • 21
  • 1
    Can you tell us more - the code you have working from an application should be able to be, for example, in the doGet() method of a servlet. You would get the data from DynamoDB this way or, for saving, perhaps in the doPost() method. Let us know a bit more about what issues you're running into. – stdunbar Feb 04 '17 at 21:14
  • Hey ! I fixed my issue, the problem was that the libraries my application needed, had to be inserted not in WEB-INF/lib but at Tomcat home in TOMCAT_HOME/lib folder !! – Kejsi Struga Feb 04 '17 at 21:51

1 Answers1

0

in the inside web you need add JAvascript and call to Server,,, You can try investigate a like

ApiRest, AJAX

this a example ,,The anwerd calling a java servlet from javascript

Community
  • 1
  • 1
  • Hi @Irving Navarro Flores thanks for answering , the thing is I need to get data from dynamo so that I can put them in csv and user can download it , which cannot be done on client-side. Therefor I am using a servlet to a file the data from dynamo, and user can download it . Still Tomcat wont start , when I place code for authentication in servlet! – Kejsi Struga Feb 04 '17 at 17:37