Wednesday, December 29, 2010

jboss-6.0.0.Final client minimal libraries

The followings are the list of libraries for jboss-6.0.0.Final client application to work properly:

concurrent.jar
jbossall-client.jar
jboss-aop-client.jar
jboss-appclient.jar
jboss-aspect-jdk50-client.jar
jboss-client.jar
jboss-common-core.jar
jboss-ejb3-async-impl.jar
jboss-ejb3-async-spi.jar
jboss-ejb3-common-client.jar
jboss-ejb3-context-spi.jar
jboss-ejb3-core-client.jar
jboss-ejb3-proxy-impl-client.jar
jboss-ejb3-proxy-spi-client.jar
jboss-ejb3-security-client.jar
jboss-integration.jar
jbossjmx-ant.jar
jboss-logging.jar
jboss-metadata-ejb.jar
jboss-remoting.jar
jboss-security-spi.jar
jbosssx-client.jar
log4j.jar


Thanks

Wednesday, December 1, 2010

Handling Redirect Issue in Ajax Call

function ajaxCall(){
var formData = getLibImgCartFormElements();
var url = "/myapp/test.jsp";
var params = "";

new Ajax.Request(
url,
{
method: 'post',
parameters: params,
onSuccess: function(response) {
if(isLoginRedirect(response)){
return;
}
$('yourDivName').innerHTML = contents;
},
onFailure: function(response) {
window.location = window.location.href;
}
}
);
}

function isLoginRedirect(response){
var contents = response.responseText;
if(response.status == 0 || contents == null || contents == '' || isLoginFormContents(contents)){
window.location = window.location.href;
return true;
}else{
return false;
}
}

function isLoginFormContents(contents){
var flag = false;
/*
* if((contents != null) && (contents.indexOf("") > 0)){ return true; }else{ return false; }
*/
return flag;
}

Monday, November 29, 2010

Creating a project(trunk, branches, tags) on svn repository

svnadmin create myproject

svn mkdir -m "created trunk" svn://username#servername/svnroot/myproject/trunk
svn info svn://username#servername/svnroot/myproject/trunk


svn mkdir -m "created branches" svn://username#servername/svnroot/myproject/branches
svn info svn://username#servername/svnroot/myproject/branches

svn mkdir -m "created branches" svn://username#servername/svnroot/myproject/tags
svn info svn://username#servername/svnroot/myproject/tags


svn copy http://username@servername/svnroot/myproject/trunk http://username@servername/svnroot/myproject/branches/myproject
-m "Creating a private branch of myproject/trunk."

Monday, February 15, 2010

How to install VNC Server on Fedora 10 / Linux

1. Visit the following url for downloading:

http://www.realvnc.com/products/free/4.1/download.html

(vnc-4_1_3-x86_linux.tar.gz)

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp vnc-4_1_3-x86_linux.tar.gz /usr/local/

3. Change the current directory

cd /usr/local/

4. Unzip/untar the file

tar -zxvf ./vnc-4_1_3-x86_linux.tar.gz

How to install Skype on Fedora 10 / Linux

1. Visit the following url for downloading:

http://www.skype.com/intl/en/download/skype/linux/choose/

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp skype-2.1.0.47-fc10.i586.rpm /usr/local/

3. Change the current directory

cd /usr/local/

4. Install the file

rpm -ivh skype-2.1.0.47-fc10.i586.rpm

How to install DbVisualizer on Fedor 10 / Linux

1. Visit the following url for downloading:

http://www.minq.se/products/dbvis/download/index.jsp

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp dbvis_linux_6_5_10.rpm /usr/local/

3. Change the current directory

cd /usr/local/

4. Install the file

rpm -ivh dbvis_linux_6_5_10.rpm

Adding subclipse plugin to eclipse

1. Run eclipse

cd eclipse
./eclipse

2. Click on Window > Preferences

3. Go to Install/Update > Available Software Sites

4. Type subclipse in Name field and http://subclipse.tigris.org/update_1.6.x (or whatever latest version) in the Location field
and click on Ok button

5. Click Ok button on Preferences Dialog box

How to install Eclipse on Fedora 10

1. Visit the following url for downloading:

http://www.eclipse.org/downloads/

(eclipse-jee-galileo-SR1-linux-gtk-x86_64.tar.gz)

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp eclipse-jee-galileo-SR1-linux-gtk-x86_64.tar.gz /usr/local/

3. Change the current directory

cd /usr/local/

4. Unzip/untar the file

tar -zxvf eclipse-jee-galileo-SR1-linux-gtk-x86_64.tar.gz

4. Run eclipse

cd eclipse
./eclipse

mod_jk [Configuring mod_jk for Apache]

1. Visit the following url for downloading:

http://tomcat.apache.org/download-connectors.cgi

2. Change the current directory

cd /usr/local/

3. Unzip/untar the file

tar -zxvf ./tomcat-connectors-1.2.28-src.tar.gz

4. Configure/Build mod_jk

cd tomcat-connectors-1.2.28-src

cd native

./configure --with-apxs=/usr/local/apache/bin/apxs --enable-EAPI

cp ./root/modules/mod_jk.so $APACHE_HOME/libexec

5. Create workers.properties in $APACHE_HOME/conf/jk with the following contents:

workers.tomcat_home=$CATALINA_HOME
workers.java_home=$JAVA_HOME
ps=/
worker.list=worker0

worker.worker0.port=8009
worker.worker0.host=localhost
worker.worker0.type=ajp13
worker.worker0.lbfactor=1

6. For Apache 1.3.x, edit $APACHE_HOME/conf/httpd.conf and add the following to the LoadModules section:

LoadModule jk_module libexec/mod_jk.so

7. For Apache 2.0.x, edit $APACHE_HOME/conf/httpd.conf and add the following to the LoadModules section:

LoadModule jk_module modules/mod_jk.so

8. Edit $APACHE_HOME/conf/httpd.conf and add the following to the AddModules section (if you have it - Apache 2 and later versions of Apache 1.3.x don't):

AddModule mod_jk.c

9. Edit $APACHE_HOME/conf/httpd.conf and add the following before Section 3 in httpd.conf:

#
# Mod_jk settings
#

JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"

JkLogLevel error

JkMount /examples/jsp default
JkMount /examples/jsp/* default

# End of mod_jk settings

The location of the Jk workers.properties and log files are relative to $APACHE_HOME. If you prefer other locations, make sure you fully qualify the paths.

In this test, we are directing all URIs that begin with "/examples/jsp" to Tomcat. The name "worker0" corresponds to the JK worker that we defined in $APACHE_HOME/conf/workers.properties. We define two JK Mounts in order to match the URI of "/examples/jsp" as well as any that start with "/examples/jsp". In a real world situation, we might only direct JSPs or servlets to the JK worker.

10. Find the line in $APACHE_HOME/httpd.conf that starts with "Port" - make sure you have it pointing to a port that is not in use. Lately, Apache has been coming with the "Port" directive set to "8080", which is the same port that Tomcat will listen on. If you don't have any other web server running, you can set it to "80" instead.

11. Test httpd.conf by typing the following:

cd $APACHE_HOME/bin
apachectl configtest

How to install Tomcat on Fedora 10

1. Visit the following url for downloading:

http://tomcat.apache.org/download-60.cgi

(Currently, the latest is Tomcat 6.0.20)

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp apache-tomcat-6.0.20-src.tar.gz /usr/local/

3. Change the current directory

cd /usr/local/

4. Unzip/untar the file

tar -zxvf ./apache-tomcat-6.0.20-src.tar.gz

5. Edit the /etc/profile file

Open /etc/profile file by the following command

vim /etc/profile

Add the following entries at the end of /etc/profile file

CATALINA_HOME=/usr/local/apache-tomcat-6.0.20
export CATALINA_HOME


Save /etc/profile file by the following commands

Esc
Shift+ Collon
:qw
Enter

How to install Apache/httpd on Fedora 10

Note: If gcc, libtool, automake, autoconf and other related tools are missing then install those with yum like:
yum install toolname
For Example:
yum install libtool

1. Visit the following url for downloading:

http://httpd.apache.org/download.cgi

(currently, the latest is 2.2.14)

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp httpd-2.2.14.tar.gz /usr/local/

3. Change the current directory

cd /usr/local/

4. Unzip/untar the file

tar -zxvf httpd-2.2.14.tar.gz

5. Configure and build

cd httpd-2.2.14
./configure --with-layout=Apache --prefix=/usr/local/apache2 --enable-rule=SHARED_CORE --enable-module=so

make
make install

6. Edit the /etc/profile file

Open /etc/profile file by the following command

vim /etc/profile

Add the following entries at the end of /etc/profile file

APACHE_HOME=/usr/local/apache2
export APACHE_HOME


Save /etc/profile file by the following commands

Esc
Shift+ Collon
:qw
Enter

How to install smartsvn on Fedora 10

1. Visit the following url for downloading:

http://www.syntevo.com/smartsvn/download.html

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp smartsvn-generic-6_0_8.tar.gz /usr/local/

3. Change the current directory

cd /usr/local/

4. Unzip/untar the file

tar -zxvf nameof.tar.gz

5. Ensure, that the correct Java Runtime Environment is installed on your system

6. start the application by using the launcher script file smartsvn.sh in the bin directory

cd smartsvn-6_0_5/bin/
./smartsvn.sh

How to install JAVA on Fedora 10

1. Visit the following url for downloading:

http://java.sun.com/javase/downloads/index.jsp

2. Copy the downloaded file to /usr/local (or to into a directory or your choice)

cp jdk-6u16-linux-x64-rpm.bin /usr/local/

3. Change the current directory

cd /usr/local/

4. Change the permission of the file you downloaded to be executable. Type:

chmod a+x jdk-6u16-linux-x64-rpm.bin

5. Verify that you have permission to execute the file. Type:

ls -l

6. To start the installation process, type:

./jdk-6u16-linux-x64-rpm.bin

7. The installation file creates jdk-6u16-linux-amd64.rpm file in the current directory.

8. Run the RPM command at the terminal to install the packages. Type:

rpm -ivh jdk-6u16-linux-amd64.rpm

9. The JRE is installed in jre1.6.0_(version number) sub-directory under the current directory.
In this case, the JRE is installed in the /usr/java directory.
Verify that the jdk1.6.0_16 sub-directory is listed under /usr/java directory.

cd /usr/java/
ls

10. Delete the bin and rpm file if you want to save disk space.

cd /usr/local/

rm jdk-6u16-linux-x64-rpm.bin

rm jdk-6u16-linux-amd64.rpm

11. Edit the /etc/profile file

Open /etc/profile file by the following command

vim /etc/profile

Add the following entries at the end of /etc/profile file

JAVA_HOME=/usr/java/jdk1.6.0_16
export JAVA_HOME

JRE_HOME=/usr/java/jdk1.6.0_16/jre
export JRE_HOME

Save /etc/profile file by the following commands

Esc
Shift+ Collon
:qw
Enter