Posts

Showing posts from January, 2016

Domain mapping for apache-tomcat-7.0.54 using virtual host

1) Add below host to your server.xml file     for me it was on  /usr/local/apache-tomcat-7.0.54/conf/server.xml   path you might find it on location to which you have install your  apache-tomcat-7.0.54 prefix="localhost_access_log." suffix=".txt" pattern="%h %l %u %t "%r" %s %b" />  2) Add your Domain name in  host name  field      2.1  appBase  is the path from were this host (a virtual server) is going to look for  .war  files      2.2 To have your application accessible by hitting @root of the domain  yourdomain.com  keep your war file name as " ROOT.war "  3) So when you start your server this will create a folder with your domain name  yourdomain.com  in below path   /usr/local/apache-tomcat-7.0.54/conf/Catalina/yourdomain.com inside which you will find a ROOT folder which has your application 

No mapping found for HTTP request with URI /j_spring_security_check in DispatcherServlet.

Need to use code like this, <form-login login-page = "/login" default-target-url = "/welcome" login-processing-url = "/j_spring_security_check" authentication-failure-url = "/login?error" username-parameter = "username" password-parameter = "password" />

Push a new local branch to a remote Git repository and track it too

1. To create a new local branch use following command, $ git checkout -b feature_branch_name 2. Make changes to files you want and add+commit them, then fire following command to push local branch to repository, $ git push -u origin feature_branch_name

Git merge options for merging conflicted changes. (Our or Theirs)

We can  tell Git to favor one side or the other when it sees a conflict. By default, when Git sees a conflict between two branches being merged, it will add merge conflict markers into your code and mark the file as conflicted and let you resolve it. If you would prefer for Git to simply choose a specific side and ignore the other side instead of letting you manually resolve the conflict, you can pass the   merge   command either a   -Xours   or   -Xtheirs . If Git sees this, it will not add conflict markers. Any differences that are mergeable, it will merge. Any differences that conflict, it will simply choose the side you specify in whole, including binary files. $ git merge mundo Auto-merging hello.rb CONFLICT (content): Merge conflict in hello.rb Resolved 'hello.rb' using previous resolution. Automatic merge failed; fix conflicts and then commit the result. However if we run it with   -Xours   or   -Xtheirs   it does not. $ git merge -Xours mundo Auto-mergi