Friday, April 4, 2008

फासले ऐसे भी होंगे ये कभी सोचा न था

फासले ऐसे भी होंगे ये कभी सोचा न था
सामने बैठा था मेरे और वो मेरा न था

वो की खुश्बू की तरह फैला था मेरे चारसू
मैं उसे महसूस कर सकता था छू सकता न था

रात भर उस की ही आहट कान में आती रही
झाँक कर देखा गली में कोई भी आया न था

अक्स तो मौजूद थे पर अक्स तनहाई के थे
आईना तो था मगर उस में तेरा चेहरा न था

आज उस ने दर्द भी अपने अलहदा कर दिए
आज मैं रोया तो मेरे साथ वो रोया न था

ये सभी वीरानियां उस के जुदा होने से थी
आँख धुन्धलाई हुई थी शहर धुन्धलाया न था

याद करके और भी तकलीफ होती थी "अदीम"
भूल जाने के सिवा अब कोई भी चारा न था

Joke

Bill worked in a pickle factory. He had been employed there for a number of years when he came home one day to confess to his wife that he had a terrible compulsion. He had an urge to stick his penis into the pickle slicer. His wife suggested that he should see a sex therapist to talk about it, but Bill said he would be too embarrassed. He vowed to overcome the compulsion on his own.

One day a few weeks later, Bill came home and his wife could see at once that something was seriously wrong.

“What’s wrong, Bill?” she asked.

“Do you remember that I told you how I had this tremendous urge to put my penis into the pickle slicer?”

“Oh, Bill, you didn’t” she exclaimed.

“Yes, I did.” he replied.

“My God, Bill, what happened?”

“I got fired.”

“No, Bill. I mean, what happened with the pickle slicer?”

“Oh…she got fired too.”

Tuesday, April 1, 2008

Accident

Maine SOCHA ke mai ghar mai akeli hoon
bas khud apni hi saheli hoon
toh socha zara naaha loo
tan ki takaan mitaa loo

Jaa kar baathroom mai shower liya
but bathroom lock nahi kiya
socha ke kaun aayega abhi
ghar ke baahar hi toh hai sabhi

Par uff kya batao aur kaise
mere saath hua kuch aise
baad shower kuch aalas tha
thoda khud par mera focus tha

mai khud se kuch gunguna rahi thi
aaine ke saamne baal bana rahi thi
saare mausam saare aalam sahi thay
bas kapde kuch maine pahne nahi thay

khula darwaaza aur meri appartmentmate saamne aayi
mujhe "UNN" dekh woh ghabraayi aur chillaayii
maine bewakoofi ka aisa kaarnaama kiya
haatho se towel uthane ki jagah muh chupa liya !!!

Multiple websites IIS

host headers.

The good news is this is relatively easy to do in IIS and it works very well. There is virtually no performance penalty and it works with most every browser in use today (browsers must be HTTP 1.1 compliant). You can use DNS to point to the website so internet users can find your host header designate site with no problems. You do have to pay attention to the details however or it won't work. The biggest downside is that you compromised using SSL. (Microsoft KB Article: Q187504 - IIS: HTTP 1.1 Host Headers Not Supported When Using SSL)

Step 1: Goto the Advanced button.
In the MMC, goto the website you to access using Host Headers and right click the Web Site and select properties. One the website page, you'll see and "Advanced" button. That's where we go next so click that. You'll notice the distinct absence of any clue that this is where you do host headers.

Step 2: Get rid of the (All Unassigned) entry (if present)!
This is where most people make their mistake. This entry tells IIS to respond to all requests to the webs server with this website. This is the same entry by default as that of the Default Web Site so you can't create this unless the default web site is stopped, which it is on a lot of sites that use host headers.

Step 3: Add the entries you want.
This is where you select the IP address (I usually select one so if in the future, I add another IP address to the server, the website isn't listening on that address.), port (an entry is required - usually 80), and the infamous host header information. In the Host Header Name field, enter the exact name you want the website to respond to. If your website's name is www.coolestsiteonearth.com then that's what you enter. Press Add.
TIP: You can make more than one entry here! Also enter coolestsiteonearth.com and your site will respond to that also.

That's it! You should probably stop and start the web site to reload the new entries.

You can access your site from a browser using the host header name. If you can't access your host header web, but can ping your IIS server, then most likely you need to enter your new website name in a DNS server that your browser can access. If you can't do that right away, you can always update the HOSTS file on your development PC to map the host header name to the IIS server IP address.

दूसरों को हमारी सज़ायें न दे

दूसरों को हमारी सज़ायें न दे
चांदनी रात को बद-दुआएं न दे

फूल से आशिकी का हुनर सीख ले
तितलियाँ ख़ुद रुकेंगी सदायें न दे

सब गुनाहों का इक़रार कराने लगें
इस कदर खूबसूरत सज़ायें न दे

मोतियों को छुपा सीपियों की तरह
बेवफाओं को अपनी वफायें न दे

मैं बिखर जाऊँगा आंसूओं की तरह
इस कदर प्यार से बददुआएं न दे

Friday, February 15, 2008

कुछ भी नही

दोस्ती के नाम पर ऐसा भी यहाँ खेल हुआ
ज़माने को कही मेरी दास्ताँ , मुझसे कहा कुछ भी नही

देखा मुझे , सोचा मुझे , टोका मुझे , रोका मुझे
मेरी खता है हर मेरी अदा , तेरी खता कुछ भी नही

ख़ुद की जलन से ही ख़ुद का चमन जला लिया
जब आग पर कागज़ रखा बाकी बचा कुछ भी नही

हर शाम तक हर सुबह तक हमे ही वह समझाते रहे
हमे दिए इतने वचन , ख़ुद ने किया कुछ भी नही

दूसरो की कब्र खोदने का शौक रहा है तुम्हे बोहोत
अब ख़ुद ही जो जा गिरे , क्या हल रहा कुछ भी नही

दो चार दिन की बात नही जो चाहेरा देख कट जायेंगे
दिल की बाजी जब लगी , तुमको मिला कुछ भी नही

kya baat chupayi hai tumne

tum jo chup chup rahte ho
aise har pal socha karte ho
kya baat chupayi hai tumne
kya dil mai rakha karte ho

jo hoth tumhare sajti hai
muskaan kyu jhoothi lagti hai
jo gunje hansi tumhari
kyu khaali khaali lagti hai

sab se mil kar bhi kyu
tum tanha tanha lagte ho
kya baat chupayi hai tumne
kya dil mai rakha karte ho

kyu kahte nahi tum mujhe
kyu nahi kuch tum batate ho
baatien kar lo laakh chaahe
kyu sach tum chupate ho

dost jo kahte ho tum mujhko
kyu anjaane se lagte ho
kya baat chupayi hai tumne
kya dil mai rakha karte ho

Monday, December 17, 2007

Schedule Defragment in Windows XP

I found a way to schedule a defragment in Windows

1. Go to Start -> Control Panel -> Scheduled Tasks -> Add Scheduled Task

2. Click "Next" in the Scheduled Task Wizard

3. Browse in C:/Windows/system32 and find defrag.exe, select it and click "Open"

4. Rename the task to your liking, example: Defragment C drive, then select how often you want to defrag, then click "Next"

5. Select the time and days (if you select weekly) then click "Next".

6. Enter a password for the username that is going to run the defrag then click "Next".

7. Click "Open advanced properties for this task when I click Finish" then click "Finish"

8. In the next window under "Run:" add a space then the drive letter to be defragmented then a colon, like this: "C:\WINDOWS\system32\defrag.exe C:"

9. Deselect "Run only if logged in" if you want it to run no matter who is logged in, then click OK.

10. It will ask for the user password again to confirm the changes.

11. To test it out, right-click on your scheduled defragment and click run. A command prompt window should come up with the drive fragment information while the defragment is running. After it is done it will go away, and you're done!

Friday, November 30, 2007

Kill a process while socket programming

netstat -a -b

look for the pid

then use

taskkill /F /PID pid

thats all folks !!!

Monday, November 19, 2007

Forgot Your Password On XP?

If you forgot your password on you windows XP here is a simple solution (Guide #1).

1. Restart you computer

2.When booting, press F8 and select "Safe Mode"

3.After getting to the user menu. Click on a user and this time it will not ask you for a password

4.Go to Start>Run and type CMD .

5.At command prompt type in cd C:WindowsSystem32, (Where C put your system's HD letter,I am assuming C is your System/Windows Drive)

6.For safety purposes first make a backup of your Logon.Scr file.. You can do this by typing in Copy Logon.scr Logon.bak

7.Then type copy CMD.EXE Logon.scr

8.Then type this command, I will assume that you want to set Administrator's password to NewPass

9.Now, type this in net user administrator NewPass

10. You will get a message saying that it was successful, this means Administrator's new password is NewPass

11. Restart the PC and you will login as Administrator (or whatever you chose to reset) with your chosen password

Tuesday, October 23, 2007

hair care

Care For Dry Hair:
Dry hair tends to be thin and rough.It is susceptible to tangles, damage, breakage and split ends.The primary aim is to replenish the oil and the moisture in the hair.

Home-made Cosmetic Care For Dry Hair:
Below are given few natural recipes that are time-tested.

The Gentle Cleanser:
Beat an egg in a cup of the skimmed milk.When the foam becomes consistent, rub it into the scalp.Leave it on for 5 minutes.Rinse the hair thoroughly with water.Carry out this routine twice a week.

The Protein Conditioner:
Beat one tbsp of castor oil, one tbsp of glycerine, one tbsp of cider vinegar and a tsp of mild herbal shampoo.Apply it on scalp and leave it on for 20 minutes.Rinse with clear water.

A Special Massage Oil Toner
Buy a bottle of castor oil or coconut oil.Add a tsp of lavender essential oil in it.Heat a little and massage it gently on your scalp at night.Rinse or shampoo it out in the morning.Follow this routine at least twice a week.

Thursday, October 18, 2007

Vanilla Ice Cream that puzzled General Motors

Vanilla Ice Cream that puzzled General Motors

Many of you, unlike me, might have come across this long ago, as it is in circulation for years now. But I just received it today and was spellbound by the incident. For those who are not aware of it, it goes like this -
Never underestimate your Clients’ Complaint, no matter how funny it might seem!

This is a real story that happened between the customer of General Motors and its Customer-Care Executive. Please read on…..

A complaint was received by the Pontiac Division of General Motors:

‘This is the second time I have written to you, and I don’t blame you for not answering me, because I sounded crazy, but it is a fact that we have a tradition in our family of Ice-Cream for dessert after dinner each night, but the kind of ice cream varies so, every night, after we’ve eaten, the whole family votes on which kind of ice cream we should have and I drive down to the store to get it. It’s also a fact that I recently purchased a new Pontiac and since then my trips to the store have created a problem….

You see, every time I buy a vanilla ice-cream, when I start back from the store my car won’t start. If I get any other kind of ice cream, the car starts just fine. I want you to know I’m serious about this question, no matter how silly it sounds “What is there about a Pontiac that makes it not start when I get vanilla ice cream, and easy to start whenever I get any other kind?” The Pontiac President was understandably skeptical about the letter, but sent an Engineer to check it out anyway.

The latter was surprised to be greeted by a successful, obviously well educated man in a fine neighborhood. He had arranged to meet the man just after dinner time, so the two hopped into the car and drove to the ice cream store. It was vanilla ice cream that night and, sure enough, after they came back to the car, it wouldn’t start.

The Engineer returned for three more nights. The first night, they got chocolate. The car started. The second night, he got strawberry. The car started. The third night he ordered vanilla. The car failed to start.

Now the engineer, being a logical man, refused to believe that this man’s car was allergic to vanilla ice cream. He arranged, therefore, to continue his visits for as long as it took to solve the problem. And toward this end he began to take notes: He jotted down all sorts of data: time of day, type of gas uses, time to drive back and forth etc.

In a short time, he had a clue: the man took less time to buy vanilla than any other flavor. Why? The answer was in the layout of the store. Vanilla, being the most popular flavor, was in a separate case at the front of the store for quick pickup. All the other flavors were kept in the back of the store at a different counter where it took considerably longer to check out the flavor.

Now, the question for the Engineer was why the car wouldn’t start when it took less time. Eureka - Time was now the problem - not the vanilla ice cream!!!! The engineer quickly came up with the answer: “vapor lock”.

It was happening every night; but the extra time taken to get the other flavors allowed the engine to cool down sufficiently to start. When the man got vanilla, the engine was still too hot for the vapor lock to dissipate.

Even crazy looking problems are sometimes real and all problems seem to be simple only when we find the solution, with cool thinking.

Tuesday, October 16, 2007

Weird Illinois Laws

Weird Illinois Laws

  • You may be arrested for vagrancy if you do not have at least one dollar bill on your person.

  • You must contact the police before entering the city in an automobile.

  • The English language is not to be spoken.

  • In Carbondale - No one may stand on the sidewalk on the 500 block of Illinois Ave.

  • In Champaign - One may not pee in his neighbor's mouth.

  • In Chicago - All businesses entering into contracts with the city must sift through their records and report any business they had dealing with slaves during the era of slavery.

  • In Chicago - Law forbids eating in a place that is on fire.

  • In Chicago - It is illegal to give a dog whiskey.

  • In Chicago - It is forbidden to fish while sitting on a giraffe's neck.

  • In Chicago - Kites may not be flown within the city limits.

  • In Chicago - In the Pullman area, it is illegal to drink beer out of a bucket while sitting on the curb.

  • In Chicago - It is legal to protest naked in front of city hall as long as you are under seventeen years of age and have legal permits.

  • In Chicago, people who are diseased, maimed, mutilated, or deformed to the point of being an unsightly or disguting object are banned from going out in public.

  • In Chicago, it is illegal to fish in pajamas.

  • In Chicago, it is illegal to take a French poodle to the opera.

  • In Cicero - Humming on public streets is prohibited on Sundays.

  • In Crete - It is considered an offense to attempt to have sex with one's dog.

  • In Crete - Cars may not be driven through the town.

  • In Crystal Lake - If one wishes to plant new sod in his or her yard in the summer months, that person may not use the city's water to water it.

  • In Des Plaines - Wheelbarrows with For-Sale signs may not be chained to trees.

  • In Evanston - Bowling is forbidden.

  • In Evanston - It is unlawful to change clothes in an automobile with the curtains drawn, except in case of fire.

  • In Galesburg - No person may keep a smelly dog.

  • In Galesburg - It is illegal to burn bird feathers.

  • In Galesburg - Jostling others is illegal.

  • In Galesburg - No bicyclist may practice "fancy riding" on any city street.

  • In Galesburg - There is a $1,000 dollar fine for beating rats with baseball bats.

  • In Guernee, it is illegal for women weighing more than 200 pounds to ride horses in shorts.

  • In Horner - It is against the law to use a slingshot unless your are a law enforcement officer.

  • In Joliet - Town fathers, reflecting the pet peeve of hearing their town's name mispronounced 'Jolly-ETTE' when all local folk know it's pronounced 'Joe-lee-ETTE', made pronouncing it Jolly-ette a misdemeanor, punishable by a $5 fine.

  • In Kenilworth - A rooster must step back three hundred feet from any residence if he wishes to crow.

  • In Kirkland - Bees are not allowed to fly over the village or through any of Kriland's streets.

  • In Moline - Ice skating at the Riverside pond during the months of June and August is prohibited.

  • In Moline - There is a ban on unnecessary repetitive driving on 23rd Avenue.

  • In Morton Grove - You may not own a handgun.

  • In Normal - It is against the law to make faces at dogs.

  • In Orland Park - No pool tables are allowed in a public establishment, because it supports gambling.

  • In Ottowa - Spitting on the sidewalk is a criminal offense.

  • In Park Ridge - Trucks may only park inside closed garages.

  • In Peoria - Basketball hoops may not be instaled on a driveway.

  • In Zion - It is illegal for anyone to give lighted cigars to dogs, cats, or any other domesticated animals.

Confusing co workers...Pulling pranks...

Are you the only guy in your office with some computer skills? Do you have a co worker who spends their whole day on Myspace, Youtube or hello kitty fan club sites? If you can follow these simple steps they wont be getting any where near those sites for some time.

If you are using windows pc there is a thing called a host file. If you are a web developer or designer, chances are you are very familiar with this file. I typically use it to test new websites by giving my computer an address to associate with the website I am working on. Now that might sound difficult and confusing to people who have never used one but it is really easy.

So here is what you do. For this example we will make it so every time I go to yahoo.com what will actually pop is google.com. If you are doing this to a friend or co-worker I’m sure you can think of something far more funny.

Step one: Find your host file

Go to the start button on the bottom right click and then select Run

run.jpg

After click run depending on what version of windows you are using you will enter one of the following (will will assume you are using Xp professional)

Windows 95/98/Me c:\windows\hosts

Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts

Windows XP Home c:\windows\system32\drivers\etc\hosts

hostrun.jpg

Now hit ok.

Step 2: Editing your host file

A new window should now be open with some files inside. Select the host file by right clicking and hitting edit. I use edit plus for this but note pad will do just fine.

edit.jpg

Now this file might look a little confusing but really its very simple. On the very top it reads something like this

# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.

what this is saying is that for every website you list you must list the IP address with it. In order for me to make yahoo become Google I first need to find out Google’s Ip.

So go back to the run menu, by clicking start the run.

This time just type cmd and click ok

cmd.jpg

Once you see a black and white screen you are going to go ahead and type the word ping with one space and the name of the website you want.

ping.jpg

What this does is gives you the ip associated with google.com. The IP I received was 64.233.187.99

Now write down the IP and head back to your host file. (you are almost done)

At the bottom of the host file you will typing in the following.

64.233.187.99 Yahoo.com

What this did was associate Google’s IP with yahoo’s name. To turn this off simply add a pound (#) before the IP.

Click save and you will be done. Close out all web browsers and re-open.

Now type in Yahoo.com, Google should pop up like this.

googleyahoo.jpg

Tadaaaaaa ! You can now confuse the crap out of you co-workers. The key to this hack is gaining access to their PC. I recommend having all the info ready before you start the prank, unless you have a lot of time.

Lastly you can do this for multiple sites at once. It can be very frustrating to whom ever you do it too.

Wednesday, October 3, 2007

Creating subheader in gridview


<asp:gridview id="GridView1" class="attr"> runat="server" autogeneratecolumns= class="attrv">"false" datasourceid="SqlDataSource1"
onrowdatabound="GridView1_RowDataBound">
<columns>
<asp:boundfield datafield= class="attrv">"ProductID" headertext="ProductID" />
<asp:boundfield datafield= class="attrv">"Name" headertext="Name" />
<asp:boundfield datafield= class="attrv">"Subcategory" headertext="Subcategory" />
</columns>
</asp:gridview>
<asp:sqldatasource id= class="attrv">"SqlDataSource1" runat="server" class="attr"> connectionstring="<%$
ConnectionStrings:AdventureWorksConnectionString %>"

selectcommand="SELECT P.*, PS.[Name]
AS [Subcategory] FROM [Production].[Product] AS P INNER JOIN [Production].[ProductSubcategory]
AS PS ON PS.[ProductSubcategoryID] = P.[ProductSubcategoryID] ORDER BY P.[ReorderPoint],
P.[Name]"
>
</asp:sqldatasource>


CODE-BEHIND 



private string m_subcategory = String.Empty;

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow gvr = e.Row;

switch (gvr.RowType)
{
case DataControlRowType.DataRow:
{
DataRowView drv = gvr.DataItem as DataRowView;

string subcategory = drv["subcategory"].ToString();

if (!subcategory.Equals(m_subcategory))
{
GridViewRow row = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Normal);
TableCell cell = new TableCell();
cell.BackColor = Color.Red;
cell.ForeColor = Color.White;
cell.ColumnSpan = GridView1.Columns.Count;
cell.HorizontalAlign = HorizontalAlign.Center;
cell.Text = subcategory;
row.Cells.Add(cell);

GridView1.Controls[0].Controls.AddAt(GridView1.Controls[0].Controls.Count - 1, row);

m_subcategory = subcategory;
}


break;
}
}
}

Filterkeys must die

It constantly amazes me the crap that gets turned on by default in Windows XP. Have you ever held down the Right Shift key for more than 8 seconds while thinking about something? That’s the default keyboard shortcut for FilterKeys. FilterKeys is an accessibility option that ignores keyboard input unless it the key is held down for a long time.

filterkeys

It isn’t annoying enough that a dialog box pops up and interrupts you if you hold shift down for too long. It has a bug. If you hit Cancel, FilterKeys *still* runs.

Pressing both shift keys is supposed to exit from it, but I prefer a more permanent approach. Death to FilterKeys.

Control Panel >> Accessibility Options >> Remove all check-marks

filterkeys

filterkeys
But wait, there’s more! That isn’t enough to get rid of FilterKeys, you also have to go to the Settings sub-menu and remove the check-marks there.

filterkeys
Hit OK twice and you’re finally rid of the damned thing.


Wednesday, September 26, 2007

nadi boli samandar sey

Nadi boli samandar sey
mai tere paas aayi hoon
mujhey bhi gaa mere shayar
mai teri hi rubaii hoon

pahan kar chand ki nathni
sitaaron sey bhara aanchal
naye jal ki nayi boondey
nayi choodi nai paayal
pahan aayi mai har gahna
hai tere sang hi rahna
lahar ki chudiya pahna
mai paani kia kalayi hoon
nadi boli samandar sey

Mujhey kartavya ney roka
mujhey adhikaar ney roka
mujhey har shaks ney roka
mujhey har pyar ney roka
magar mai ruk nahi paayi
mai tere sang chali aayi
mujhey tu aankh mai bhar ley
mai aansoo ki vidai hoon
nadi boli samandar sey

Friday, September 21, 2007

Deploying JSP on IIS

Configuring JSP for IIS

Many people love the ease and security of using Internet Information Services 6 server on Windows 2003. Adding PHP and ASP support is a cinch, and in no time at all, IIS 6 can serve anything you throw at it – except JSP files of course. By no stretch of imagination is getting JSP running invisibly with IIS 6 an easy job, and here’s the best way to do it.

In this guide, we’ll be using IIS 6 on Windows Server 2003 with SP1 installed, together with the Tomcat servlet engine (version 5.5.17 stable) to parse the JSP files that IIS may encounter. It covers all the prerequisites and how to get them up and running.

This guide assumes you already have II6 6.0 configured and running 100% with everything all right and trouble-free, and assumes Tomcat (and it’s prerequisites) isn’t already installed. Here goes..

Install JVM

Tomcat is a Java servlet, and requires the presence of Sun’s JDK to run. You can grab the Java EE 5 JDK off of Sun’s servers. Start the installer, make sure the J2EE Development Kit is selected if you’re doing a custom install, and let it finish.

If you installed it using the default settings, it should have installed the JDK files to “C:\Program Files\Java\jdk1.5.0_06” or something close to it, depending on the version you installed. Make sure you also let it install the JRE, you’re going to need it later. Write down or otherwise memorize the JDK location you used, it’s important.

Download and Install Tomcat

Grab Tomcat 5.5.x from the Apache Software Foundation’s website here. Download the latest entry under Binary Distributions -> Core. For quickest deployment, make sure to download the .exe file rather than the zip package. Run the exe, select “Full Install” and let it save to the default location (C:\Program Files\Apache Software Foundation\Tomcat 5.5), herein referred to as $CATALINA_HOME. It will ask for the JRE/JDK location, you will need to input the value you copied down earlier and continue.

When the setup finishes, start the service and continue. To test if it installed OK, direct your browser to http://localhost:8080/, assuming everything has gone well (no reason it shouldn’t), you should get the stock Tomcat welcome page – now that Tomcat is up and running all what’s left is to make it play nice with IIS..

IIS Configuration

The Jakarta/Tomcat project has lent itself to the creation of an excellent set of plugins and dlls: the Tomcat Connectors. The one we’re looking for hooks straight into IIS and is called ‘isapi_redirect*.dll’ where the ‘*’ is the version number. Head over to the Tomcat distribution site and grab the latest version of isapi_redirect.dll.

Once you have isapi_redirect*.dll, copy it to $CATALINA_HOME/bin/isapi_redirect.dll. Download isapi_redirect.properties to that same directory. You may need to tweak this file (in WordPad) if you installed Tomcat to a non-standard directory.

Download workers.properties and uriworkermap.properties and copy them to the $CATALINA_HOME/conf directory.

Open the IIS management MMC, and right-click the default website -> Properties -> ISAPI Filters. From there proceed to add a filter called ‘isapi_redirect’ that points to $CATALINA_HOME/bin/isapi_redirect.dll. Apply changes and close the dialog.

Right-click the default website again, and this time add a “Virtual Directory” called ‘jakarta’ (without the quotes!) that points to $CATALINA_HOME/bin/ (the same place as isapi_redirect.dll). Give it ‘execute’ privileges when prompted. You need to set permissions on the the files we’ve just modified/created in order for the filter to work.

Next you need to tell IIS that these files are a-OK, and that it’s safe to run them. In the IIS management center again, click “Web Service Extensions” -> “Add a new Web service extension..” For ‘extension name’ enter “JSP” and for the executable file, locate $CATALINA_HOME/bin/isapi_redirect.dll, check “set this extension to allowed”, and then press OK.

Time to restart IIS. Stop it and start it again or just use the quick restart manager. To test Tomcat’s integration with IIS, point your browser to http://localhost/jsp-examples/ and if everything went all right… you’re done!

Configuring the Redirects

Remember the file you downloaded? “uriworkermap.properties?” That’s where you have to define the subdirectories in $CATALINA_HOME/webapps directory. For example, the file you downloaded had the “jsp-examples” context already defined./jsp-examples/*=neosmart tells it to transfer any calls to localhost/jsp-examples to a Tomcat configuration that you downloaded earlier called ‘neosmart.’

Adding more contexts is easy — once you’ve successfully configured Tomcat to run whatever webapp/jar file you want it to, (and that application is now successfully running on port 8080), simply add an entry /mycontext/*=neosmart where ‘mycontext’ is obviously the name of the webapp (the subfolder) you’re trying to configure.

But in order to get it to completely act as a natural directory within IIS, you have to add another virtual directory. You can point it wherever you like, but you must have a virtual directory named the same thing as the context (for instance, if you have http://localhost:8080/jspBB/ you would create a virtual directory called jspBB in IIS). That’s to ensure that calls to http://localhost/jspBB work just as well as http://localhost/jspBB/ (note the end-backslash).

That’s it, you’re done! You know have a port-free address that redirects all calls invisibly and silently to Tomcat, the power, advanced features, and security of IIS with the added flexibility of Java Server Pages!

It’s Still not Working?

If it seems it’s still not working, i.e. you can view the pages via TomCat (by entering the port in the URL) but not by using IIS, try this:

The files you download are text files (obviously) with certain configuration bits in them. Open each one and check some of the values. Many contain paths to TomCat and the JDK: make sure the same paths that are in the file are the same as your configuration. Ensure that all of the paths work, there are no typos, and that all the files are present and in the right directory. If it still doesn’t work, http://neosmart.net/forums/ is the place to go. No support requests in the blog please!

Thursday, September 13, 2007

kuchh bhi nahi

dosti key naam par aisa bhi yahan khel hua
zamane ko kahi meri daastan, mujhsey kaha kuch bhi nahi

dekha mujhey, socha mujhey, tOka mujhey, roka mujhey
meri khataa hai har meri adaa, teri khaata kuch bhi nahi

khud ki jalan sey hi khud ka chaman jala liya
jab aag par kaaGaz rakhaa baaki bachaa kuchh bhi nahi

har shaam tak har subah tak hame hi woh samjhaate rahe
hame diye itne vachan, khud ney kiya kuch bhi nahi


dosaron ki kabra khodne ka shauk raha hai tumhe bohot
ab khud hi jo jaa gire, kya hal raha kuchh bhi nahi

do chaar din ki baat nahi jo chahera dekh kat jaayengey
dil ki baazi jab lagi, tumko mila kuchh bhi nahi

Chunnu chuha

चुन्नू चूहा और चुन्नी चुहिया
जब चले साथ और साथ
इसकी बातें उसकी बातें
हर उत्तर था उनके पास

सोचते के सब है जानते
इसे उसे सबको समझाते
बिन कारन बिन सोचे जाने
बात की बात बनाते

रास्ता था लंबा
नही चला देर तक खेल
हुई ज़रा सी जो बारिश
टूट गया दोनों का मेल