Social Icons

Pages

Sunday, 23 September 2012

Run a database upgrade script for your maven project.

If you build your project using maven but use ant to upgrade the database following will be a guideline to configure the environment if you get an error as ANT_HOME Not found.

Background description:
The first time you check out the project from the svn repository and build it the database scripts will get unpacked in a folder. In most large projects the folder name is database for correct location.

Whenever you wish to access the database upgrade script and run it from the command line you will have to use the following steps.

1.If ant is used to build the scripts then the first step to perform is to set the ANT_HOME.
I have to perform research as to if there are two project with their own ant instances how does it specifically work. But,however in order to set the ANT_HOME specify the path in the environment variables to point to the specific ant.bat file location.

For example :
DriveName:\ProjectName\database\target\sqlserver\bin -> this is the location of the ant.bat file.

If you set the ANT_HOME correctly you will not get the following error:
ANT_HOME not found.

2.After that open a fresh instance of the command prompt and then run the script again which should work great.


Problem solved. 


Friday, 21 September 2012

Remove index.php from magento url

If you’re working with magento it may be the case that index.php is visible in all the URLs of your magento based website. You’ll most likely want to remove index.php from the URL when you go live.
Here are the steps that will work for you :
  •  From Magento’s admin panel go to System > Configuration > Web and in Search Engine Optimization tab just change “Use Web Server Rewrites” to Yes
  •  Make sure both Base URLs for Secure and Unsecure tab don’t contain index.php
  •  Go to your site root folder and you will find the .htaccess file there. Open it on text editor and find the line #Rewrite Base/ magento. Just replace it with Rewrite Base/
  •  Go to Cache management page (system > cache management ) just refresh your cache and refresh the Web Rewrites also.

Hope all the above steps will work for you. If they don't please let me know.

Tuesday, 18 September 2012

Some great articles and tools to begin learning SEO



SEO and Internet marketing have become integral parts of any successful online business. Internet start-ups, entrepreneurs, businesses, as well as bloggers all need to pay heed to SEO and Internet marketing if they have to succeed online. It's also a topic that is misunderstood.According to me it has to do with how search engines are constantly refining their search algorithms for increased performance and relevant results. I also started working  on SEO and Internet marketing and came across some nice articles and tools during my research. I would share those with you. Although i will keep on updating this post as I will gather some more information.

Great SEO articles

Here is a list of the some nice articles relating to SEO and its application for business (large and small):

Great SEO tools

There are lots of tools available and it is very difficult to position them as most of them are equally good. Below are some tools that I have checked and are trusted ones. Although I will keep on updating this list with tools that I will find useful.
For more free SEO tools you can visit here.

If you come across any nice article or tool for SEO please share it with us.

Sunday, 16 September 2012

Now Deploying your JAVA applications is a mouse click away..

And we are NOT talking about JAVA applets here...

Why Not Deploy your applications as Applets

Well there are lots of reasons you don't want to use applets..(however simple writing 'em...)...to list a few...

1. JRE specific

Some Applets are JRE specific...you definitely don't want to design your applications for a Specific JRE...

2. Manual download needed if your browser doesn't have JAVA

Some browsers, notably mobile browsers running Apple iOS or Android do not run Java applets at all...You definitely can't assume every browser would have JRE.

3. No Well-defined standard 

There is no standard to make the content of applets available to screen readers. Therefore, applets can harm the accessibility of a web site to users with special needs.

4. Cross Browser compatibility issues

Web Start has an advantage over applets in that it overcomes many compatibility problems with browsers' Java plugins and different JVM versions.

And thankfully Sun did address these issues by bringing a new,flexible and robust deployment solution for Java technology-based applications...and that is JAVAWS(not to be confused with JAVA Web Services)...It is JAVA Web Start.


What's  JWS 

JavaWS is a framework which allows users to start application software for the Java Platform directly from the Internet using a web browser.

Why Java Web Start over Applets:



1. Auto-download of Software from java.sun.com
A main feature of the Java Network Launching Protocol and API technology is the ability to automatically download and install Java Runtime Environments onto the users machine.
For example, an application might depend APIs in Sun's Java Runtime Environment 1.4.0 (or later). When a user first accesses this application, the Java Web Start software will download all the needed files for the application, as well as download the Java Runtime Environment (JRE) if the requested version is not available locally. The ability to automatically download a JRE is one aof the key features to ensure robust deployments. It ensures that the JRE that your application is tested on will be available on the user's machine, as well as make it possible to seamlessly upgrade to improved versions of the Java 2 platform over time.

2. Eliminates Cross-Browser compatibility issues
Web Start has an advantage over applets in that it overcomes many compatibility problems with browsers' Java plugins and different JVM versions. On the other hand, Web Start programs are no longer part of the web page. They are independent applications that run in a separate frame. 

3. Security 
By default, Java Web Start applications run "restricted", which means that they do not have access to some system resources such as local files. But publishers can remove these restrictions by signing their Web Start applications with the jarsigner tool that comes with the JDK.


How to Implement
The JWS is often termed similar to JNLP(JAVA Network Launcher Protocol), defined with an XML schema, specifies how to launch Java Web Start applications. JNLP consists of a set of rules defining how exactly to implement the launching mechanism. JNLP files include information such as the location of the jar package file and the name of the main class for the application, in addition to any other parameters for the program. A properly configured browser passes JNLP files to a Java Runtime Environment (JRE) which in turn downloads the application onto the user's machine and starts executing it. 
  



Monday, 10 September 2012

Add States to Country in Magento.

By default in magento only few countries have a state drop down when a country ( like United States) is selected. Here we will see how to add state drop down for other countries as well.
The main table where all the state values of a country are stored is directory_country_region and directory_country_region_name.

The fields of the table ‘directory_country_region’ are
1. region_id: auto-incremented id
2. country_id: the iso code of country (this code is taken from directory_country table)
3. code: unique code to be used for a state
4. default_name: name of the state

The second table is directory_country_region_name with fields
1. locale: website locale or language of the website
2. region_id: it’s a forign key from the previous table
3. name: name of the state for a specific language or locale.
The first table is required to add states to a country, the second table is only required if you want  state to be displayed in multiple languages.
So to add state to country Australia, we need to insert a row in the table directory_country_region.

insert into SCHEMA_NAME.directory_country_region (country_id,code,default_name) values ('AU','AU-NSW','New South Wales');
 




Here ‘AU’ is the country code for Australia, ‘AU-NSW’ is a user defined unique key and ‘New South Wales’ is the name of the state. Similarly we can add other states as well.

Let me know if you find any questions related to above tutorial.

Saturday, 8 September 2012

Adding a "Home" link in the Navigation Bar of Magento store

Many Magento users wish to include a link in their main navigation that links back to the Home page of their site. Currently, this is not a feature Magento offers natively, but it can be added manually by using the following steps :


Note: There should be a CMS page for "Home Page" (name may be different) in CMS>pages in your admin panel.

Logic: 
1) Create Subcategory with name "Home".
2) We will than redirect its link to "Home Page" CMS page.
Here are the steps:

Step 1: Create a Subcategory

To add page links to the top navigation:

  1. From the Admin panel, select Catalog > Manage Categories.
  2. On the Categories Management page, click Add Subcategory. Then, do the following:
    1. Enter a Name for the link.
    2. Scroll down to the bottom of the form, and set Is Active to “Yes.”
    3. Set Include in Navigation Menu to “Yes.”
    4. In the URL Key field, type the name of your page link in lowercase letters with hyphens instead of spaces. (For example,Home Page becomes home-page.)
  3. In the upper-right, click the Save Category button.

Step 2: Create a Redirect

  1. From the Admin panel, select Catalog > URL Rewrite Management.
  2. In the text box at the top of the Request Path column, type the URL key for the subcategory, and click Search. When the the subcategory appears, click to open the record. 
  3. Copy the Target Path (whatever it may be) to the clipboard or write it down somewhere.
  4. Set Redirect to “Permanent (301),” and click Save.

    Now, you will be on URL Rewrite Management page again.
  5. In the upper-right corner of the URL Rewrite Management page, click the Add URL Rewrite button, and do the following:
    1. In the Create URL Rewrite list, select Custom. A form appears in the lower part of the page.
    2. In the ID Path text field, type the URL key of the page link. (For this example, home-page .)
    3. In the Request Path, either paste or type the Target Path value that you previously copied at point 3.
    4. In the Target Path field, type the URL for the Home Page. Here you can enter "../index.php" (without quotes).
    5. Set Redirect to “Permanent (301).”
  6. Click Save.
To confirm the change, visit any page of your store, and click the Home link in navigation bar to verify that it goes to the Home page.

If you still find some issue with this, then please let me know. I will help you out.
 

Contact Us

info@intellozene.com

Our Website:
www.intellozene.com