Skip to main content

Posts

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...

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA

ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA Solution : Try changing your ORA properties. from this : ORA11gR23 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = orasrv-alanb-lx06) (PORT = 1521 ) ) (CONNECT_DATA = ( SERVER = DEDICATED) (SERVICE_NAME = ORA11gR23) ) ) )    To this: ORA11gR23 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = orasrv-alanb-lx06) (PORT = 1521 ) ) (CONNECT_DATA = ( SERVER = DEDICATED) (SERVICE_NAME = ORA11gR23) ) )    your SERVICE_NAME = ORA11gR23 should match the name you have given before description.

Unknown Provider : $locationProviderProvider <- $locationProvider

Error : Unknown Provider : $locationProviderProvider <- $locationProvider <- myCtrl  also got this error. You're allowed to inject a $location into a controller, but not a $locationProvider. Instead, the $locationProvider can be injected into a config method: Solution : var app = angular.module( "myApp" , []); app.config( function ($locationProvider) { $locationProvider.html5Mode( true ); }); app.controller( "myCtrl" , function ($location) { $location.path( "/some/path" ); }); And since I made this additional mistake: it's not just that you should add an app.config bit, but also remember to remove $locationProvider from the controller arguments, or you'll keep getting this error. Also you have to add <base> tag in your html file <head> tag <base href= "/myDemoProject/" >

Angular alert will not display after being closed

Problem : when you try to close the angular success and error pop up using manullay or using alert('close') event. HTML <div class= "cacheSuccessMessage alert alert-success alert-dismissable-success" > <span class= "cacheMessageHeader" ><strong></strong></span> <div class= "cacheMessageDetails" ></div> </div> JS: $( ".alert-dismissable-success" ).fadeTo( 4000 , 500 ).slideUp( 500 , function () { $( ".alert-dismissable-success" ).alert( 'close' ); }) so when you fire event of close Data-dismiss completely removes the element.  Solution :   Use jQuery's .hide() or angular hide method instead to hide error. and modify you HTML and JS as  HTML <div class= "cacheSuccessMessage alert alert-success" > <span class= "cacheMessageHeader" ></span> <...

Tail Logger for Big .log files - Log Expert

While development you might encountered problem of logging big files for logging every time we have to either load  .log file in notepad on in any other software. here is a software which smartly handle all your log files and it follows the tail Summary of features: Tail mode MDI-Interface with Tabs Search function (including RegEx) Bookmarks A very flexible filter view Highlighting lines via search criteria Columnizers: This means splitting log lines into columns for some well defined logfile formats Unicode support log4j XML file support 3rd party plugin support SFTP support (loading files directly from SFTP) Plugin API for more log file data sources You can download it from here. http://logexpert.codeplex.com/

Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.2.3.RELEASE:repackage failed: Unable to find main class

Solutions:  Solution 1 : You needed to change the packaging parameter to jar from pom. Also, the repositories , pluginRepositories , the maven-compiler-plugin and the spring-boot-maven-plugin's version and executions weren't needed. Solution 2:  Try mvn install and see if it works Solution 3: Preview: <properties> <!-- The main class to start by executing java -jar --> <start-class> com.mycorp.starter.HelloWorldApplication </start-class> </properties> Solution 4: Enable the main() method in your Application.java. Configure spring-boot-maven-plugin to specify the class with the main class (Spring should find it anyway if you have one, but good to be explicit): Preview: <plugin> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-maven-plugin </artifactId> <version> ${spring-boot-version} </version>...