About Me...

Hello world! Me? An eccentric living organism that ponders the supernatural abilities of humanity

Get The Latest Posts

Sign up to get email updates

Tuesday, December 01, 2009

Apache Tomcat: Download, Install and Configure

 Tomcat is a free, open-source servlet/JSP engine that was developed by the Jakarta Project at the Apache Software Foundation and it is the official reference implementation of the servlet/JSP specification set forth by Sun. Tomcat is one of the most popular servlet/JSP engines available for Java web application development. It can be used as both the web server and the servlet engine. I've been using Tomcat for most of my Java web applications. For Tomcat to work properly, it should be able to access the JDK installed on your machine. I assume you are familiar with these and you should have all these components(the Java class library, compiler and the JRE) installed on your machine before you install Tomcat.
 The following procedure is intended for Windows users only but if you are using a different OS, you should be able to install Tomcat with similar steps described here. If you are having trouble with a different OS, I suggest you follow the instructions for that platform.
The current Tomcat version, which is version 6.0.20(at the time of writing) supports JSP2.1 and servlet2.5 specifications.

Follow these steps to install and configure Tomcat

Download and Install Tomcat

  1. Go to http://tomcat.apache.org/ 
  2. Find the Download page for Tomcat6.x 
  3. Scroll down to the Binary Distributions heading(it is also possible to use the source distribution but for the purpose of this article, I'm using the binary distribution)
  4. Under the Core subheading, click on the link for the zip file.
  5. Save it to your hard disk(its name should be something like apache-tomcat-6.0.20.zip).
  6. Extract it and move it to your C drive.
  7. Copy the following .jar files from Tomcat's lib directory(don't move, just copy-paste them) to the JDK's jre\lib\ext directory.
  • servlet-api.jar
  • jsp-api.jar
  • el-api.jar
  • tomcat-dbcp.jar

Set the JAVA_HOME environment variable

In recent versions of Tomcat, the sevlet engine is named Catalina. You will have to change a batch file called catalina.bat in order for this engine to work with JDK.
  1. Open the apache-tomcat-6.0.20(in my case) directory.
  2. Open the directory named bin.
  3. Right-click the catalina.bat file and click "Edit" (this will open the batch file in a Notepad).
  4. Scroll down pass the remarks(they begin with the "rem" keyword).
  5. Immediately after the remarks, enter a "set" statement that sets the JAVA_HOME variable to the directory that contains the JDK of your system.
This is what it looked like when I set it in my machine...(see below)

 set JAVA_HOME=c:\Program Files\Java\jdk1.6.0

you should replace the part in red with the path relevant to your JDK. Don't leave any white space between the assignment operator(=)

     6. Save your changes with catalina.bat file
     7. Start Tomcat and test for some JSP pages.
»»  read more

Monday, November 30, 2009

Changing tomcat's default port

Tomcat's default port is 8080(default port for most browsers is 80). Sometimes you may encounter port conflicts when two applications try to share the same port. If this happens with Tomcat, you will have to change the Tomcat's default port to a different one depending on the availability of that port. If a port is causing an error in a web application, you will often see a "Page can not be displayed" error message(but bear in mind that there can be other reasons that cause the browser to display this message). In this short post I will show you how to change the default port of Tomcat using its configuration files.
  1. Open the Tomcat home directory(in my case, this is named apache-tomcat6.0.20).
  2. Go to its bin folder.
  3. Open the server.xml file using Notepad(right click>Edit).
  4. Replace all occurrences of 8080 with a number larger than 1024(although it is not mandatory to select a port higher than 1024 if you are using Windows as your OS, it is a good practice to get anything higher than 1024. There are reasons for this but I'm not going to discuss about them here since it is beyond the scope of this article)
  5. Finally, restart Tomcat and test it for some URLs.
You may also like to have a look at the post about how to download and install Apache Tomcat6.0.20

So that's how you change Tomcat's port manually. It wasn't that difficult was it?
»»  read more

Tuesday, November 24, 2009

Hey, I'm on Twitter!

I just created my Twitter account few minutes ago and now going to study how it works. I wanted to find out what all this hype about and why it has become a great threat to Facebook. Plenty of my friends are already on Twitter and I wanted to get connected with them too. When I joined Facebook, I was not that interested about it and I hardly had time to log into my account due to the busy schedule at my university but now I can't live even a single day without logging into Facebook. So that's what happens when you join a social networking site. I'm not going to write a post about Twitter here. But I'll post a small video that I found on Twitter Help page. It will help you to get started. And don't forget to add me to your list of followers and get updates about new stuff. I would love to follow you guys on Twitter too.






»»  read more

Friday, October 23, 2009

Dear mom

A mother enters her daughter's bedroom and sees a letter over the bed. With the worst premonition, she reads it, with trembling hands.

Dear mom,
It is with great regret and sorrow that I'm telling you that I have eloped with my new boyfriend. I found real passion and he is so nice, even with all his piercings and tattoos, and I love riding on the back of his big motorcycle. But it's not only that mom, I'm pregnant and Dillon said that we will be very happy in his trailer in the woods. He wants to have many more children with me and that's one of my dreams. I've learned that marijuana doesn't hurt anyone and we'll be growing it for us and his friends, who are providing us with all the cocaine and ecstasy we may want. In the meantime, we'll pray for science to find the AIDS cure, for Dillon to get better, he deserves it.
Don't worry mom, I'm 15 years old now and I know how to take care of myself. Someday I'll visit so you can get to know your grandchildren.


Your daughter,
Katie




PS. Mom, it's not true. I'm next door at Wilma's. I just wanted to show you that there are worse things in life than my results sheet that's in my desk drawer... I love you!
»»  read more

Thursday, October 22, 2009

Something about "Paid Surveys"

Paid Surveys have been one of the most popular and proven ways to earn some extra cash. Many people around the world are involved in these programs and I too have been using them for quite a while now.

I'm sure you have heard of such programs and probably some of you might already be involved in those programs. For those of you who have not yet come across the term Paid Surveys, I'll give you a brief introduction of the system and how it works.


Multinational businesses are very much concerned about their target market and customer satisfaction. They need to know what their clientele expects from them and at the same time, fulfill their demands and satisfy them. Every year these global marketing giants spend millions of dollars to find out what their customers really need and how to cater those demands. Knowing these is highly important to them when it comes to embarking on new business ventures and improving the quality of their own products.

In order to find out what their customers think about them, they carry out surveys and other means of gathering information. Surveys are not something new to the world and I hope you have at least taken part in some of them in your life. So likewise, online surveys are also similar to them and as with any other normal survey, all you have to do is take part in them and give your true opinion.

These companies are looking for people like you and me to participate in their surveys. They are looking for public opinion and yes, they are willing to spend millions of dollars for that!


You might think why they are so bounty... well, that's where it gets great! These businesses need your opinion about their products and that enables them to make changes, improvements, alterations and in some cases, get rid of their not so popular products. So in order to get these valuable information, they require us to provide them with our genuine idea about them. Remember, here, we represent their customers and customers are their best asset when it comes to a business establishment. So the bottom line is we provide them with accurate and reliable information on the topic they want to know and they give us a small reward for giving them that little bit of information. Think of it as a win-win situation where both parties are satisfied after the deal.


Now that you have some idea about what these paid surveys are, I'll give you some explanations about how they operate. There are hundreds of market research companies out there and they are the ones who conduct those surveys on behalf of a client (let's say like, Nike, Coca Cola for instance). These marketing research companies have an online representation which allows them to carry out internet-based surveys. i.e they have their own website. So you have to go and register in their websites in order to participate in their surveys. But there are some catches about this too. For example, you might have to pay an initial membership fee and you also have to provide them with your personal information too. Giving them your personal information allows them to pick the most ideal set of participants for a particular survey (So there is a good reason behind it).

There is a great deal of tips I need to share with you in this matter but I don't feel like including them all in this post because then this would be a very long article. So for now, I'm ending this short introduction on paid surveys but I'll be revealing other useful information about them in future. So keep coming back...
»»  read more

Wednesday, October 07, 2009

Adding Subtitles to a Movie

Have you ever wanted to watch a movie with subtitles on?

Sometimes, the pronunciation is a little too ambiguous and hard to follow. So in such cases, it's better to have subtitles... Don't you think so?

well, adding subtitles to a movie is so easy and it only takes 5 minutes(at most)!

Here I will explain you how to accomplish it.

But first you need to have a specific software installed for subtitles to work. I suggest you install K-Lite Codec Pack. It's one of the best codec packs available and it works with almost all kinds of media formats. You can download it from this site

After you download it, install the default configuration(this only takes 5 minutes) and you are free to use it for your media files.

Now let's get to the subject :)

Here's what you have to do:
1. Download the subtitle file from the Internet
2. Integrate it with the movie file

Before we get in to the actual process, let me explain what is a "Subtitle file". Subtitle files are files with .SUB/.IDX,.SRT, .SUP, and .SSA. There is also .SMI, .TXT, and about 20 others.
You can download them from a suitable website. I'll list some of the popular sites below

Subscene (what I use)
OpenSubtitles
DivX Subtitles
Any Subs
RDW Subtitles
Subbiee Search

You can download your subtitle file from any of the above sites. Subtitle files are usually 40 to 80kB (when zipped) and therefore downloading takes only seconds!

Ok let's get back to the process ;)

For the purpose of this tutorial, let's say you want to add subtitles to the movie "Twilight" (assuming that your Twilight copy doesn't have any subtitles) ;)

Once you download the zipped file(most of the time, the files are zipped to increase the download speed), extract it and get the file which has a .srt (or any of the above extensions) extension and place it inside the same folder(see the screenshot below)


click on the image to see in actual size


Then rename the subtitle file with the same name as the movie file(this is the most important step). For example, if your movie file's name is Twilight.avi then the subtitle file's name should be Twilight.srt (depending on the type of file that you downloaded).

And there you are! Now you have successfully applied the subtitle file to your movie. :)

Now I'll summarize the steps we have done so far (skipping the codec installation part)
1. Downloading the relevent subtitle file.
2. Unzipping it and obtain the .srt file.
3. Placing it inside the same folder that contains the movie file.
4. Renaming the subtitle file with the same name as the movie file.
»»  read more

Thursday, May 28, 2009

Free JavaScript Hosting for Your Blog

Today, I'm going to introduce you to a really useful website that provides some very valuable services for bloggers for no cost. Nowadays, I see many blogs use some cool animations on their headers and Home Pages. Check this blog, this blog or this blog to see what I mean. Usually, these animations are done using JavaScript codes. So you will have to embed these JavaScript codes to your XML blogger template. But doing that is a little bit ugly because then your blog's source code will be stuffed with all sorts of programming language codes. So the best way to solve this is to keep the JavaScript in a separate file and then link it to your XML template through some HTML. For that you need to find a file sharing website that allows you to upload your JavaScript files.

I tried several free file sharing websites(mediafire, fileqube, filefactory, nakido) but none of the allows hotlinking(that is the feature you need for this) for free account holders. However, if you have a premium account, you are entitled to that feature but unfortunately I couldn't afford to spend my money on that(I was having a low budget while I was in university). So I went in search of a site that allows hotlinking of files for free. After some effort, I came across these two sites called fileave and hotlinkfiles. I created free accounts in both sites and tested  the JavaScript linking. Guess what? It worked!

I think you have seen the fading image effect which is displayed on the Home Page of this blog(if you haven't, then see that cool effect here). That animation is achieved by linking an external JavaScript file to this blogger template. That JavaScript file is hosted at HotlinkFiles - Get Free File Hosting now!

So the next time you need a file host that allows hotlinking of files for free, I recommend these sites

»»  read more

Wednesday, March 25, 2009

How to add your own blog icon to your blog

The icon that appears next to the URL of a blog is called a Favicon. Have you seen blogs that have a different logo(other than the Google's default blogger logo) in the address bar? That adds some professionalism to your blog and says to the world that you know something more than what the average blogger knows. Take a look at the URL of this blog. Can you see the animated red-yellow logo at the beginning of the address bar? That's what I'm talking about. Today, I will tell you how to do this with your own blog. It is quite easy and it took only ten minutes for me to do it. So follow the steps below...

Step 1
Create a 16x16 .gif or .jpg image using any photo editing software(MS Paint, MS Picture Manager, Photoshop etc.). If you don't know how to do it, you can use a free online tool for that. I recommend this site to create your favicon because it's so easy and it's completely free!
Once you create it, download it and save it on to your desktop.

Step 2
Upload your image(the favicon you just created) to a photo sharing website. I suggest you use Google Picasa which is available to all blogger account owners. You can use this service to host all your blog-related images and again the good thing is it's completely free! Here is how you upload your images to picasa
  • Log in to your picasa account using your gmail username and password.
  • Select the blog that you want to apply the favicon for.
  • Click upload button.
  • Select the image/favicon from your desktop.
  • Upload the image.




Step 3
Click on the newly uploaded image. Then you will be taken to a page that has information about that image. On the right-side of the screen, you will see a link called "Link to this Photo". Click on that link to expand it (see the screen shot on the left of the window).
Under the "Embed image", tick the "Image only (no link)" checkbox.
Then copy the URL of the image. Make sure to copy the URL provided in the second text box (I have encircled it in blue). This value will be different from what you see in this screen shot.


Step 4
Now go to your blogger dashboard and click "Layout" and then the "Edit HTML" tab.
Before you do anything, download the current template(in case something goes wrong).

Now comes the tricky part :-)
Step 5
Locate the following line of code

<title><data:blog.pageTitle /></title>

Step 6
Immediately after that line, paste this code

<link href='theUrlOfTheImageThatYouObtainedInStep3' rel='shortcut icon' type='image/x-icon' />

Make sure to replace the part in red by the URL of your image. Everything in the above code is case-sensitive, so don't make any changes except replacing the relevant URL. The quotation marks are very important so don't omit them either.

Step 7
After doing that, save your template and preview and if everything went well, you should see your new blog logo in the address bar instead of the orange blogger logo.


So that's all there is to customizing your own blog logo. I hope this article will be useful to you and if you encounter any problems or error messages while editing the HTML, feel free to leave a comment below and I'm very happy to help you with it.
»»  read more

Tuesday, March 03, 2009

Privacy Policy

At mindrising.blogspot.com, I understand that privacy of your personal information is of great importance to you. Thus, I am committed to safeguarding your privacy while online at this blog. The following discloses how I gather and disseminate information on this blog. This information is not sold to third parties or used in any form for any illegal activity.

Links
This blog contains links to other websites/blogs and be aware that I am not liable for the privacy and data collection practices of those external websites/blogs. It is important for my visitors to be aware of this when they leave this blog through a such link and I suggest you read the privacy statements of every site that collects personally identifiable information.

Log Files
As with most other websites/blogs, I collect and use data contained in log files for analytical purposes. This information includes, but not limited to, IP(Internet Protocol) address, ISP(Internet Service Provider), browser type, visited/exit pages, referral URL, platform, date/time stamp and demographic data. However, this information is not linked to personally identifiable information in any manner.

Cookies and Web Beacons
This blog does not create or store cookies by itself. Nevertheless, I use third party advertising companies to serve ads when you visit this blog and these companies use cookies on this blog and they may use this information(not including your name, address, email and telephone numbers) to provide advertisements about goods and services that interest you. It is generally used for geotargeting purposes(for example, showing Florida hotels to residents of Florida). For more information about this process and to learn your options about not having this information used by these companies, please visit Google's Advertising and Privacy page. Google AdSense uses DoubleClick DART cookie. The DART cookie enables Google to serve targeted ads across its AdSense network. You may opt out of the use of DART cookie by visiting Google's Privacy Center. If you wish to opt out of advertising companies tracking and tailoring ads that match your surfing patterns, you may do so at Network Advertising Initiative. You can also choose to disable or selectively turn off these cookies by adjusting your browser settings.

Advertisers and Third Party Sponsored Advertisements
Advertisements that appear on this blog are sponsored ads by Google AdSense and I do not personally endorse the products and services advertised in those ads. Those companies are not affiliated with mindrising.blogspot.com. The only affiliation is the one between mindrising.blogspot.com and the company that serves the ads.

Affiliate Programs
This blog employs affiliate programs for monetizing. I consider my role as an affiliate marketer very seriously and therefore, I have chosen to recommend only the products I use or have thoroughly researched and I do not directly sell any product through this blog. If you have questions or need more information about any affiliations on this blog, please don't hesitate to contact me and I will be able to provide more information where possible.

This privacy policy applies solely to information collected on this blog. If you have any concerns regarding the contents of this blog, you can contact me through my personal email address- stallionb547[at]yahoo[dot]com
»»  read more

Friday, February 20, 2009

About me

My name is Phoenixand. Although I'm not a geek or nerdy, I'm a bit of a tech savvy person. Currently I'm studying for my B.Sc (better known as "BS" in some countries) degree. Computer Science, Chemistry, Biochemistry and Plant Science are the subjects that I'm following. I'm familiar with a number of programming and markup languages and technologies(PHP, JavaScript, XML, J2EE, J2SE, AJAX, SEO, UML and the list goes on... ;-) !!!) but my major interest is on Java(Oh did I say that I'm a Sun Certified Java Programmer? Yes SCJP5.0 done!). In addition to those, I'm also into Database Programming using SQL in MySQL and Oracle DBMSs. These days I'm studying for the SCWCD exam.

I've always wanted to share my knowledge with others and I believe that this blog will help me to reach out to friends in the far corners of the world. I'm not a professional blogger and therefore, I will be writing on topics such as blog optimization and Java which involve some technical material. I started this blog to get a feel of technical writing and now thinking of using it as an additional income source as well.

I love to make friends and hate to lose any. I usually spend about three to four hours on Facebook(yeah I have turned in to a huge Facebook addict over the past few years). I love Rugby, Cycling, Football and Cricket and will definitely sacrifice the Sunday morning chemistry paper to watch any one of them on a weekend. I'm also fond of Chess and Scrabble.
»»  read more

Tuesday, January 13, 2009

Another Busy Day :-(

Phew... I wish I could end this misery and start on what I truly love doing...yep, I'm talking about programming and lots of it... ;-) (the misery was something else).

Today I was asked to conduct a "Kuppi" for some of my fellow students on Java!!!

Gosh I have piles of other notes to study and I haven't even touched some of them :-(

But what ever the reason, you can't turn down a request(well... that was virtually a "plea") asking for some help and therefore, I agreed on it and did the kuppi... for 4 hours !!! and boy am I not exhausted now.

I wish I could sit back and watch some movie or listen to some music but that is not written in my destiny until I finish my first degree...

first O/Ls... then A/Ls... later University stuff... MSc... Ph.D
what next ???
»»  read more

Friday, January 09, 2009

A Busy Day Of Work

Today was the last academic day of the first semester of the 3rd year of my degree program. I was quite relieved to see the end of this semester as I haven't prepared well for the exams and I wanted to see the back of the session and start a new beginning next time.

We had to submit 2 assignments today; one for chemistry and the other one for information technology. I did the chemistry assignment with the help of some other students and submitted it just in time and as for the IT assingment, I did it virtually all by myself and submitted 2 copies of the same file...(so much for commitment) !!!

Tomorrow, I have to attend my Java classes and I have a program to write before I go... not sure whether I will be able to complete it on the dead line.

I'm a bit tired now and I wish I could go to sleep early but however it seems that it's the last thing that I will be able to do today because some visitors are about to drop by in a few hours time...They came all the way from New Zealand and therefore we couldn't turn down the suggestion of the visit.

Now I must go and get ready for them...as if they are coming to see me ;-)

Anyhow, it's always better to be in a pleasant mood when a visitor comes don't you think so?
»»  read more