Skip to main content

Posts

Showing posts from April, 2017

HTTP Status 405 – HTTP method GET is not supported by this URL

Problem : HTTP Status 405 - HTTP method GET is not supported by this URL Solution : This is always caused by following two reasons 1) You do not have a valid doGet() method, when you type the servlet’s path in address bar directly, the web container like Tomcat will try to invoke the doGet() method. public void doGet (HttpServletRequest request, HttpServletResponse response) throws IOException{ } 2) You made a HTTP post request from a HTML form, but you do not have a doPost() method to handle it. The doGet() cannot handle the “Post” request. public void doPost (HttpServletRequest request, HttpServletResponse response) throws IOException{ } Example of wrong doGet() and doPost() method protected void doPost (HttpServletRequest request, HttpServletResponse response, PrintWriter Out){ } These two methods get() and post() must have only 2 parameters otherwise it will not be called.

Display data from Json in Angularjs

Problem : I'm using the following code, witch includes the app.js, page.html and data.json The app.js seems to work fine, but the view (page.html) isn't display any data.. HTML : <div ng-controller= "tablesController" style= "padding-left: 15px" > <div class= "ng-scope" > <div class= "row ng-scope" ></div> </div> </div> <div> <md -list flex > <md -list-item class= "md-3-line" ng-repeat= "item in hotelList" ng-click= "null" > <img ng-src= "{{item.hotel_data_node.img_selected.thumb.l}}?{{$index}}" class= "md-avatar" alt= "" /> <div class= "md-list-item-text" layout= "column" > <h3> {{item.hotel_data_node.name}} </h3> Rating : <h4> {{item.hotel_data_node.extra.gir_data.hotel_rating}} </h4> </div> < /md...