Monthly Archives: May 2013

IE CSS and IE issues

Java Servlet Struts Hibernate links

http://www.javatpoint.com/servlet-tutorial
http://www.java2s.com/Tutorial/Java/0400__Servlet/Catalog0400__Servlet.htm
http://www.tutorialspoint.com/servlets/
http://www.vogella.com/articles/EclipseWTP/article.html
http://www.javascripter.net/faq/browsern.htm
http://www.techferry.com/articles/RESTful-web-services-JAX-RS-annotations.html
http://www.mastertheboss.com/resteasy/resteasy-tutorial-part-two-web-parameters
http://www.mkyong.com/webservices/jax-rs/jax-rs-formparam-example/
http://tutorials.jenkov.com/
http://www.ibm.com/developerworks/java/
http://www.javacodegeeks.com/java/core-java
 
servlet
http://www.java4s.com/hibernate/hibernate-in-servlet-example-hibernate-in-servlet-tutorial/
http://r4r.co.in/java/hibernate/basic/tutorial/hibernate-basic-tutorials/Servlet%20And%20Hibernate%20Connectivity.shtml
http://www.java-samples.com/showtutorial.php?tutorialid=1304
http://www.datadisk.co.uk/html_docs/jsp/jsp_mvc_tutorial.htm
https://sites.google.com/site/freej2eevideotutorial/
http://www.j2eetutorials.50webs.com/servlet_introduction.html
http://www.javatpoint.com/GenericServlet-class
http://docs.oracle.com/javaee/1.3/api/javax/servlet/Servlet.html
http://www.roseindia.net/struts/
http://docs.oracle.com/cd/E13222_01/wls/docs81/webapp/web_xml.html
http://met.guc.edu.eg/OnlineTutorials/JSP%20-%20Servlets/Full%20Login%20Example.aspx#
http://javateacher.co.in/web-technologies/servlets/login-logout-with-servlets/
http://javaskool.com/
http://w3processing.com/index.php?subMenuId=170
 
struts
http://www.tutorialspoint.com/struts_2/struts_examples.htm
http://www.mkyong.com/tutorials/struts-tutorials/
http://www.dzone.com/tutorials/css/struts
http://javabrains.koushik.org/p/struts-2.html
http://www.javatpoint.com/struts-2-tutorial
http://j2ee.masslight.com/Chapter4.html
http://java9s.com/struts-2-mvc/struts-2-mvc-framework-introduction
hibernate
 
hibernate
http://www.java4s.com/hibernate/hibernate-framework-index/
http://www.dzone.com/tutorials/java/hibernate/hibernate-tutorial/hibernate-tutorial.html
http://www.mkyong.com/tutorials/hibernate-tutorials/
http://answers.java4s.com/
http://javapapers.com/core-java/java-serialization/
 

Ajax Examples

html tutorial web links

 
Here is few html tutorial web links
 
http://www.tutorialspoint.com/html/html_embed_tag.htm
http://www.webdesignerdepot.com/2012/11/how-to-create-a-simple-css3-tooltip/
http://www.codeproject.com/Articles/546960/HTML5-Quick-Start-Web-Application
https://developers.google.com/speed/docs/best-practices/rtt#CombineExternalJS
http://www.codeproject.com/Articles/209041/HTML5-Web-Socket-in-Essence
http://www.ibm.com/developerworks/web/library/wa-reverseajax2/index.html?ca=drs-
http://wiki4.caucho.com/Understanding_WebSockets_versus_Ajax/REST_for_Java_EE_Developers
http://www.cssportal.com/
http://www.cssportal.com/css-hacks/
http://test.learningjquery.com/jquery-methods.html
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects
http://www.technicallobby.com/studymaterial/technical-lobby-java-j2ee-study-material
http://api.jquery.com/category/manipulation/
http://api.jquery.com/jQuery.ajax/
http://www.tizag.com/
http://html5doctor.com/html5-custom-data-attributes/
http://rajwin-aravind.blogspot.in/2011/10/learn-all-computer-laguages-in-tamilc.html
http://programmingintamil.blogspot.in/

How To Setup Apache Virtual Host Configuration (With Examples)

Using Apache Virtual Host, you can run several websites on the same server.
For example, I can run both thegeekstuff.com and top5freeware.com on a single physical server that has one Apache webserver running on it.

Fig: Apache Virtual Host (Multiple websites, one Apache)

There are two types of Apache virtual host configurations: 1) IP-Based Virtual Host and 2) Name-based Virtual Host. Name-based virtual host is recommended for most scenarios.

IP-Based Virtual Host

In this configuration, when you are pointing two websites (with different ip-address) to the server that runs Apache, that physical server should have two different ip-address configured.
This means that the server should have two ethernet cards, each one of them configured to the ip-address of the corresponding website that Apache virtual host will be serving. So, this is not practical for most aspects, and you should not be using this.
In the following example, the server contains two NIC cards, one is configured with 192.168.101.1 ip-address for thegeekstuff.com, another is configured with 192.168.102.1 for top5freeware.com. Both these ip-address are served by a single Apache webserver running on that server using IP-Based virtual host.

Fig: Apache IP-Based Virtual Host

Name-Based Virtual Host

In this configuration, when Apache webserver receives a request, it looks for the hostname in the HTTP header, and depending on the hostname, it servers different websites. This is very easy, as you need only one ip-address on that physical server; but, you update the DNS with multiple website names pointing to the same ip-address. For all practical purpose, you’ll be using only Name-based virtual host configuration.
In the following example, the server contains only one NIC card, which is configured with 192.168.101.1 ip-address. The DNS entry for both thegeekstuff.com and top5freeware.com website points to 192.168.101.1 ip-address. When Apache recives a request, it looks for the hostname entry in the HTTP header, and serves the corresponding website.

Fig: Apache Name-Based Virtual Host

1. Uncomment httpd-vhosts.conf in httpd.conf

If you’ve installed Apache 2 from source, by default, the following line will be commented in the httpd.conf file. Uncomment this line.
# vi /usr/local/apache2/conf/httpd.conf
Include conf/extra/httpd-vhosts.conf

2. Setup virtual hosts

Modify the httpd-vhosts.conf as shown below to setup named-based virtual host setting for two hosts.
  • NameVirtualHost *:80 – Indicates that all the name-based virtual hosts will be listening on the default port 80
  • – Enclose all the apache configuration parameters for each and every virtual host between these VirtualHost tags. Any apache directives can be used within the virtualhost container.
  • In the following example, we are setting up virtual host for thegeekstuff.com and top5freeware.com listening on the same port 80. So, there will be two , one for each website.
  • When you go to thegeekstuff.com, the files under /usr/local/apache2/docs/thegeekstuff will be served by Apache; and the access_log and error_log for this site will go under /usr/local/apache2/logs/thegeekstuff
# vi /usr/local/apache2/conf/extra/httpd-vhosts.conf
NameVirtualHost *:80


ServerAdmin ramesh@thegeekstuff.com
DocumentRoot "/usr/local/apache2/docs/thegeekstuff"
ServerName thegeekstuff.com
ServerAlias www.thegeekstuff.com
ErrorLog "logs/thegeekstuff/error_log"
CustomLog "logs/thegeekstuff/access_log" common



ServerAdmin ramesh@top5freeware.com
DocumentRoot "/usr/local/apache2/docs/top5freeware"
ServerName top5freeware.com
ServerAlias www.top5freeware.com
ErrorLog "logs/top5freeware/error_log"
CustomLog "logs/top5freeware/access_log" common

3. Check VirtualHost Configuration Syntax

Verify virtual configuration syntax using “httpd -S” as shown below. When everything is setup properly, it just displays “Syntax OK”.
# /usr/local/apache2/bin/httpd -S
VirtualHost configuration:
Syntax OK
When something is not configured properly, it will display warning message, including “directory does not exit” message as shown below.
# /usr/local/apache2/bin/httpd -S
Warning: DocumentRoot [/usr/local/apache2/docs/top5freeware] does not exist
Warning: ErrorLog [/usr/local/apache2/logs/thegeekstuff] does not exist
Syntax OK

4. Restart the Apache and test

# /usr/local/apache2/bin/apachectl restart
Now, when you go to thegeekstuff.com (or www.thegeekstuff.com), the apache will serve the files from /usr/local/apache2/docs/thegeekstuff directory.
When you go to top5freeware.com (or www.top5freeware.com), the same apache running on the same server will serve the files from /usr/local/apache2/docs/top5freeware directory.
Just to reiterate, for the name-based virtual host to work properly, the DNS entry for both these websites should be pointing to the same external ip-address of the physical server where the Apache webserver is running.

Linux Sysadmin CourseLinux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.
Get the Linux Sysadmin Course Now!

Browser Links – 11 Apr 2013

Require.js
http://requirejs.org/docs/start.html#add http://backbonetutorials.com/organizing-backbone-using-modules/ http://net.tutsplus.com/tutorials/javascript-ajax/a-requirejs-backbone-and-bower-starter-template/ http://jspro.com/toolsandlibraries/understanding-requirejs-for-effective-javascript-module-loading/ http://javascriptplayground.com/blog/2012/07/requirejs-amd-tutorial-introduction
Ajax
http://www.stoimen.com/blog/2009/11/03/ajax-datatypes-in-jquery-format-and-access/ https://github.com/educoder/rollcall/wiki/jQuery-AJAX-Examples https://github.com/educoder/rollcall/wiki/API-Docs http://www.w3schools.com/jquery/ajax_ajax.asp http://www.9lessons.info/2011/03/multiple-ajax-requests-with-jquery.html http://www.9lessons.info/2012/07/ssl-certificate-installation.html https://github.com/educoder/rollcall/wiki/API-Docs http://jules.boussekeyt.org/2012/backbonejs-tips-tricks.html
Password Strength Indicator and Generator
http://benjaminsterling.com/password-strength-indicator-and-generator/ http://css-tricks.com/snippets/jquery/password-strength/ http://bassistance.de/jquery-plugins/jquery-plugin-password-validation/
Build Nginx
nginx http://www.howtoforge.com/building-nginx-from-source-on-debian-squeeze http://www.rackspace.com/knowledge_center/article/ubuntu-and-debian-installing-nginx-from-source https://calomel.org/nginx.html https://gist.github.com/zefer/829289 http://wiki.nginx.org/Install http://www.thegeekstuff.com/2011/07/install-nginx-from-source/ http://library.linode.com/web-servers/nginx/installation/ubuntu-12.04-precise-pangolin http://wiki.nginx.org/Nginx-init-ubuntu http://www.ramkitech.com/2013/01/tomcat-clustering-series-part-5-nginx.html nginx startup script http://wiki.nginx.org/Nginx-init-ubuntu http://serverfault.com/questions/69350/launch-nginx-on-startup https://gist.github.com/continuityapp/938648

Html Tutorials
http://www.tutorialspoint.com/html/html_embed_tag.htm http://snipplr.com/all/language/JavaScript http://www.webdesignerdepot.com/2012/11/how-to-create-a-simple-css3-tooltip/ http://www.codeproject.com/Articles/546960/HTML5-Quick-Start-Web-Application https://developers.google.com/speed/docs/best-practices/rtt#CombineExternalJS http://www.codeproject.com/Articles/209041/HTML5-Web-Socket-in-Essence http://www.ibm.com/developerworks/web/library/wa-reverseajax2/index.html?ca=drs- http://wiki4.caucho.com/Understanding_WebSockets_versus_Ajax/REST_for_Java_EE_Developers http://www.cssportal.com/ http://www.cssportal.com/css-hacks/ http://test.learningjquery.com/jquery-methods.html https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects http://www.technicallobby.com/studymaterial/technical-lobby-java-j2ee-study-material http://api.jquery.com/category/manipulation/ http://api.jquery.com/jQuery.ajax/ http://www.tizag.com/ http://html5doctor.com/html5-custom-data-attributes/

Convert all urls to html anchor tag (link).
http://www.focal55.com/blog/jquery-tutorial-change-urls-text-links-automatically http://stackoverflow.com/questions/37684/how-to-replace-plain-urls-with-links

RockMongo
http://www.blogjava.net/czihong/articles/372136.html
Created on —> date
http://momentjs.com/ http://ejohn.org/blog/javascript-pretty-date/ http://stackoverflow.com/questions/2782976/convert-facebook-date-format-to-javascript-date
FB social share buttons links
http://snipplr.com/view/32784/share-on-facebook/ http://pastie.org/private/sbswdvf1m3awhismg0fhyq http://www.mindfiresolutions.com/Creating-a-custom-Share-on-Facebook-button-453.php http://my.opera.com/tagawa/blog/static-social-media-share-buttons
Local storage
http://www.codeproject.com/Articles/162783/HTML5-Web-Storage-in-Essence http://www.codeproject.com/Articles/361428/HTML5-Web-Storage http://www.codeproject.com/Articles/550689/HTML5-Web-Storage-Example-TODO http://www.codeproject.com/Articles/546960/HTML5-Quick-Start-Web-Application