How to add a widget area to the bottom of every post.

Web, WordPress
This tutorial shows how to add a widget area to the bottom of every post. On many sites you will find a standard text at the bottom of all WordPress posts. This is a great place to remind your readers about something you want them to do, a special promotion you are running, etc. Next we will show you how to add a widget area to the bottom of every post. Once you have the widget area in place, you can add any desired content to that area using the admin pages of WordPress. 1) Register the widget First you need to tell WordPress you want a new widget to be available. To do so, you need to add the following to your functions.php file, which is located in the…
Read More

Running JBoss AS 7 as a Windows service

Java EE, JBoss, Web
This tutorial shows you how to run a JBoss AS 7 server as a Windows Service. First of all, grab the appropriate native connectors from http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-10 (x86 for 32bit host, x64 for 64bit). If you are not sure, use the 32bit version since they will work on 64bit systems also but the reverse is not true. Unzip the archive in the JBoss main folder. Then make some modifications to the service.bat file Rename the SVCNAME, SVCDISP and SVCDESC to something more meaningful. This is optional but if you plan to install multiple servers (e.g. test and production, you want different names. Modify the JAVA_OPTS to increase memory, service.bat doesn't read any other conf.bat file so it will use default memory settings and will die of memory loss for a mid-sized…
Read More

How to make a JBoss AS/EAP accessible from remote locations.

Java EE, JBoss, Web
This tutorial shows how to make a JBoss AS/EAP accessible from remote locations. Per default, a newly installed JBoss AS or EAP is only accessible from the machine it is installed on. This is done to prevent access to the Application Server before security settings are applied. Once the server is properly configured, you need to make the following changes in order to access the server from a remote address: Go to the Application Server Management page on http://127.0.0.1:9990 on the machine the server is running on (or the machine ip address if remote management is enabled) Login with the administrator account Select the "Profile" View Go to section "General Configuration > Interfaces" Select Interface "public" Change the Inet Address to "${jboss.bind.address:0.0.0.0}" Press save Restart the server. The server log…
Read More

How to install a database driver on JBoss EAP 6 or JBoss AS 7

Java EE, JBoss, Web
This tutorial describes how to install a database driver on a JBoss EAP 6 or JBoss AS 7 Application Server. 1. Installation In this document {JBOSS_HOME} refers to the root folder of the JBoss Application Server installation. First create a module Go to {JBOSS_HOME}\modules. Create following directory structure. JBOSS_HOME}\modules\com\oracle\ojdbc6\main (the "main" as last folder is crucial!) In that folder put the oracle jdbc jar. For example ojdbc6-11.2.0.3.jar. In the same folder create a file module.xml Add this content to the file: [crayon-5a377fa7bbaef465375119/] - The name in line 2) "com.oracle.ojdbc6" must match the directory structure created in step 2. (omit the "main" part). - In line 4) the resource-root path must point to the jar file in the main folder. 2. Next install the database driver module     If JBoss…
Read More

How to Add Your Site to the main search engines.

Web
This short tutorial shows you haw to add your site to the main search engines. 1. Submit your site to Google a) Go to https://www.google.com/webmasters/tools/submit-url.       You might have to login with your google account. b) Specify your site in the form "http://www.yourdomain.extention" c) Fill in the Captcha d) Press the "Submit Request" button - Google Webmaster Tools 2. Submit your site to Bing a) Go to http://www.bing.com/toolbox/submit-site-url b) Specify your site in the form "http://www.yourdomain.extention" c) Fill in the Captcha d) Press the "SUBMIT" button - Bing Webmaster
Read More

Making the content area of the WordPress twenty-fourteen template wider.

Web, WordPress
This tutorial shows you how to make the content area of the WordPress twenty-fourteen template wider in 4 easy steps. Why should I do this? The default content with of 474 pixels is rather small and content is wrapped quickly. This may reduce the reading quality of your content. To fix this issue you could simple modify the style.css in the /wp-content/themes/twentyfourteen folder, but a better way is to create a child template and specify the style changes in there: 1. Create a child folder Go to the /wp-content/themes folder of your WordPress installation and create a new folder. You can call it [main-template-name]-child but that is not required. In this case we will create the folder twentyfourteen-child. 2. Create a file style.css In the newly created folder, create the style.css…
Read More

Making the WordPress twenty-fourteen template centered.

Web, WordPress
This tutorial shows you how to make the WordPress twenty-fourteen template centered in 4 easy steps. You can simple modify the style.css in the /wp-content/themes/twentyfourteen folder, but a better way is to create a child template and specify the style changes in there: 1. Create a child folder Go to the /wp-content/themes folder of your WordPress installation and create a new folder. You can call it [main-template-name]-child but that is not required. In this case we will create the folder twentyfourteen-child. 2. Create a file style.css In the newly created folder, create the style.css file and add the following content to it: [crayon-5a377fa7bc2e5881148787/] The only real important part in this section is the "Template: [name-of-parent-template]" line. You need to reference an existing template here. In order to center the page content we…
Read More

Configurable data-source references in persistence.xml with JBoss properties

Java EE, JBoss, Web
This tutorial shows you how to make the data-source references in your persistence.xml configurable. Why should I do this? Hard-coding your data-sources in your persistence.xml is not always the best option. You may need to deploy your application on a server which has a data-source with the specific name configured to a different database. Or you might want to deploy several instances of the same application on the same server. That is why it can be useful to make your data-source references configurable. 1. Edit your persistence.xml Initially your persistence.xml may look like this [crayon-5a377fa7bcc6e698749066/] Where jdbc/MyDataSource maps to a configured data-source on the JBoss Application server. Now change this jdbc/MyDataSource in java:comp/env/jdbc/MyDataSource. [crayon-5a377fa7bcc77403045816/] 2. Add resource references to your web.xml The WEB-INF/web.xml file becomes the link between the reference…
Read More

Google material design icons – change color

Material design, Web
This tutorial shows you how to change the color of Google’s material design icons in your web project. After following the tutorial Google material design icons you should have some icon SVG files in your web project. This is a sample material design icon file (ic_add_24px.svg): [crayon-5a377fa7bd0b1177469107/] which results in 1. Hard-code the color in the SVG One option is to hard-code the color in the SVG. If you want a light and dark flavor of your icon then you can add the color code in the SVG: [crayon-5a377fa7bd0b8811746341/] which results in 2. Soft-code the color in the SVG A better option might be to allow setting the color by CSS. [crayon-5a377fa7bd0bb445125096/] Change the SVG by adding a class attribute in the path section. Now you can control the color by CSS: [crayon-5a377fa7bd0be632947886/] which results…
Read More

Google material design icons

Material design, Web
This tutorial shows you how to use Google's material design icons in your web project in five simple steps. 1. Find the icon you want to use Go to http://google.github.io/material-design-icons/ and look for the icon you want to use. Let's use the icon "add": Be sure to remember the category of the icon: "content" in this case. 2. Find the SVG file for the icon Go to https://github.com/google/material-design-icons/tree/master/[category]/svg. In this case, replace [category] with "content". 3. Get the SVG code by selecting the RAW view on the file which gives you this: 4. Create an SVG file in your project image folder copy the content of the above page into a file in your web project. 5. Reference the icon in your HTML code Once you created the SVG file you can reference it in…
Read More