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

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

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

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

Mainey kaha tha na

मैने कहा था ना

जब चलोगे साथ ऐसे लोगों के
तुम गिरोगे, मैने कहा था ना
आगे चाहे अभी कितना चले जाओ
पल में तुम रुकोगे मैने कहा था ना

जानते थे शायद तुम मुझसे ज्यादा
मुझसे ज़्यादा समझते भी थे कभी
तुमने कही थी मुझसे लाख बातें
पर एक दिन तुम मेरी सुनोगे मैने कहा था ना

ना शिकवा ना गिला ना शिकायत ना ताना
बस था मुझे आज तुम्हे यह बताना
रहोगे जिसके साथ तुम हर वक्त
तुम भी वैसे ही लगोगे मैने कहा था ना