Archive for October, 2009

Well at the moment even i cannot answer this quiestion, but yes i definetly can talk over this as of now. Well I have been surfing the net a lot in the recent times to find out some information of the return of the main characters of the show. Well I came across one of these articles which is not very impressive but not very disappointing too. I am pasting the article here for everyone to view.

” Dill Mil Gayye recently introduced new interns to give the show a fresh look, but in the process the old interns haven’t been seen too much. Rumour is one the leads, Jennifer Winget, who plays Dr Ridhima, may not come back to the show at all because of rumours of her linkup with Karan Singh Grover, who plays Dr Armaan.

ur source says, “Jennifer is very unhappy about the linkup and the story of her slapping her co-star Karan. The actor was in love with Jennifer and promised her marriage but at the same time he was also dating his choreographer Nicole from Jhalak Dikhhla Jaa 3. She is so upset about these stories that she is not willing to talk about it.”

The script of the show reportedly requires Armaan and Ridhima to be together but Jennifer is not in favour of returning to the show. It is possible she may come back for a few episodes, after which she might make a permanent exit from the story. At a press conference for her new show, Teen Ka Tadka, we asked Jennifer about her comeback, to which she said, “Let’s not talk about that show, we are here for this show.”

Amitabh Raina, creative head of Dill Mil Gayye, says, “I have not heard about this; she is require in the show as per the script. We have different tracks to concentrate on right now and she is not required for the next three months.”

guys.. this is a direct news..! i dont know.. whtz happening..! this should not happen..! “fingers crossed” “

This is neither very disappointing nor very impressive, but it only raises confusion in the minds of what is going to happen. But I am sharing this since at least the creative head’s words do give a little ray of hope for everyone.

I just read somewhere that Jennifer Winget has a one year contract with the show, but since she does not want to shoot for the show anymore (because of the rumors), she still might have to come back for a few episodes sometime later. Well this is something that made me happy at the end (that she may have to return to the show). But if the creative head is to be believed this will not happen for the next three months at least. Also there is no news from Karan Singh Grover. I could not find any article anywhere that would enlighten about his return. Also many articles mentioned that since a lot things are happening in his personal lives and the media has also somewhat made him as a villain of some sought, he has not been giving any interview to anyone, neither on his personal life nor on his professional one. So I guess we can only wait to check if he is going to return to the show or not. Also I am not sure of all this because of my last post, because if that is true we might not have the show itself after a couple of months leave aside The fact of Armaan and Ridhhima coming back. So I guess we can only hope that they return soon and the show is not ended on a bizarre note. Also what I feel is that if the show is to be ended soon the creative’s might just bring them back in the last week or say for the last two episodes just to end the show on a high. I hope this does not happen, what I actually mean by this is that the show does not end soon but both Armaan and Ridhhima come to the show as soon as possible.

While searching over the internet I came across one of these articles that speak about that Star One channel is looking for a makeover and possibly try to shut down quite a few shows and start others that will attract a little wider generation. I am pasting the article here for everyone. I am not sure this is true or not but it comes from a source that I trust at least.

” Star One shows which have been centering around youth based subjects have not clicked too well with the masses!! While COLORS, the #1 General Entertainment Channel sits cozily with a soaring GRP of 314, Star One lags far behind with a GRP of a meager 51.

According to our source, “The channel is now looking for a major reconstruction in terms of its programming. This includes plans of considering the closure of youth based shows Dill Mill Gayye and Love Ne Mila Di Jodi”.

It is heard that the Shakuntalam Telefilms show Love Ne Mila Di Jodi has recently been served a notice to better its ratings. However, when we called Chandana Sharma, the lead girl of the show, she denied the news.

Producer Shyamashis Bhattacharya, Shakuntalam Telefilms too denied having received any notice and said, “Lots of high points are coming up in the story, with which hopefully the ratings will go up”.

Coming to Dill Mill Gayye, sources say that this long running medical drama might wrap up in December. Earlier, it was suggested that the creatives may attempt to resurrect the once highly popular Cinevistaas show with the return of Karan Singh Grover. But with his recent bad publicity owing to the problems in his personal life, the channel is skeptical if he will again click with the audience. Also, chances of Karan and Jennifer Winget working together look dim after all that happened between them.

An insider who is part of Dill Mill Gayye, on terms of anonymity said, “It is fine if the channel wants to take off the show. It has lived its life, but you cannot blame it on the TRP, as the channel’s ratings itself don’t rock”.

Another insider further added that no decision has been taken as of now, but if the ratings of Dill Mill Gayye don’t improve, then anything can happen.

It is also speculated that the channel is looking for a complete image change. “In place of the current youth based content, the channel may opt for social and family drama based shows which are popular with other GEC. In such a scenario, even the new property Hum Dono Hai Alag Alag might end. The only show that might survive the purge is Miley Jab Hum Tum, as it is doing well, and of course the newly introduced show Jaane Pehchaane Seh Yeh Ajnabbi”.

Another source said that the reason why the above college based show rocks is the freshness of the story and the college back drop, which is nowhere to be seen on television.

Well, let’s see whether the existing shows on the channel manage to pass the acid test or not!! “

Well this article disappoints me further. I had just somehow started to like the new interns and then I read this article. Another disappointment is that Love ne Mila Di Jodi is a show that I had started liking as it has got a lot of twists and turns and the story here is moving quite fast. But one can never say what exactly is in the mind of the channel heads. Anyways Star One is known to end its shows abruptly and this is not something new to them. The number of shows it ended abruptly is endless starting from the days of Remix. This is one of the reasons why no show has continued for a long time on the channel. Remix had stayed for about 1 and a half years or a little more and now Dill Mill Gayye has stayed for more than two years making these the only two shows that have survived for such a long time on the show. This is sad and I guess that is one of the reasons why the channel does not get high GRP. Otherwise this channel had good shows running, for example, Remix, Siddhant, Special Squad, Sarabhai vs. Sarabhai, India Calling and now Dill Mill Gayye and a few more to add to this were shows that did click with the viewers.

Now talking about the makeover of the channel, I think it’s not really correct as this only one of the channels apart from Sab TV that I think have a large variety in their shows and most of the shows do attract the youth and the younger generation as well not like the other channels. In really shows aspect as well they have shown Great Indian Laughter Challenge, one of the concepts that are taken by a lot many other channels now.

I definitely feel that they don’t need a makeover. They just need to put a few things in the minds of the show’s producers and creative’s that they should stick around their original story line and not experiment too much with it and definitely the shows will rock amongst the viewers.

Well I have been surfing for a long time try and get as much information about the return of the lead characters in the show. Well to be honest I could not get much information on it. But yes I did find a very good piece of article. By reading this I realized how much the show has affected the lives of millions of people around and also how this situation should actually be dealt with. This also opened by eyes in some way or another. Here is the article.

” My dear blog vasis….

Hope you are all doing well… Wish you all a very happy and a prosperous diwali…. its almost been months since i wrote a full fledged post on this blog.. the recent happenings however have urged me to come and write… irrespective of what opinions people hold on this issue… i always consider(ed) the blog my home and have taken liberties in speaking what i think will benefit one and all on the blog.. you can ignore it , if you dont come from the same line of thought….

At this point in time i am sooo tempted to say “ I told you so….” but i will not use those very words but go around the issue in my own words…. you all know what we are talking about… we are talking about the so called celebrity infidelity… that has hit the media like a storm…. we all know who we are talking about… he is so sweet, he is cute, he is an amazing guy… blah blah blah… i dont care… at this point in time, what i want each and every one of you to realise , is the fact that, atleast now, stop idolising on screen stars… this post is mainly targeted to those teenagers and kids who made Karan god… those people who still refuse to believe he could have cheated on his wife.. those crazy people who are ready to even justify his betrayal…. grow up guys… and wake up to the reality… that you shouldn’t involve yourself so much in a tv show that you forget that you have a life… and a REAL one at that…

This is actually the best time to make this post… DMG has a new set of faces… honestly DMG had served its prime.. but like us, the creatives also dont seem to be in a mood to let go… do you remember the 2.1 trp days of DMG? Today its barely 0.5…. chalo lets forget numbers… what the hell is happening on DMG???? Not now…. what the hell has been happening on DMG since January? Once everyone came to know about AR, what track did the story take? Did it evoke the same emotion it once did… when we saw the i love you i hate you confession? Or the holi confession? The bomb scene? The AR date? The tujh main rab dikhta hai number? I tried really hard to accept Jenny… cos after shilpa, before Suku came in she was the most obvious choice for Riddhima in my head… but she let me down… honestly when i think about it now, did i have to think so much about a tv show? Do anyone of us have to think so much about a tv show? Why do we have to wait for the clock to strike 8:30 every Monday to Thursday? Why does it matter when AR are not together? Why cant you easily accept Sid and Tammanna, in Place of Armaan and Riddhima, when we easily let go of Rahul and Juhi of Sanjeevani? Why are we constantly appealing to the creatives to change the story line so that nothing displeases us?

Honestly, DMG for a very very long time had been on a path of self destruction… the team had stopped thinking like a pro team.. they simply catered and fed audiences egos by providing innmerous moments and a flimsy storyline… they never were the conventional tv show in the first place…
All of this surely has done not just Karan, DMG and its team bad, its harmed us too… its raised the expectations of the audience to a level where its no longer considered criticism… its now called overt interference…. if karan doesn’t come to the set, we know… if jenny isnt around we know.. if suku doesn’t come for weeks we know we can contact who’s who of the team to know whats wrong… if Shilpa anand is on a holiday we still know… if all this were the admiration from a fans side it would have been fine.. today its much more than that.. today its like an obsession… DMG has created a false image and a hope in the hearts of women… it has made a prototype of a romantic hero… ARMAAN… who sadly doesn’t exist…. and the biggest awakening to the fact must have come when you guys saw, what the guy who played it for two years did to his own wife, his co star and his co-dancer did in his own life!

Need i say more? Just wake up and accept the reality…. Let DMG fade away gracefully… and accept that and move on in life as well..
niha “

Well I also agree with Niha that I too always wanted Jennifer as Ridhhima once Shilpa left the show, and yes once she did come she has been disappointing. In a way not really very disappointing but yes possibly she could not live up to the expectations I had created for her.

Also the message given by her that not to idolize the actors is absolutely correct. As personally I admire the characters more than the actors. And I always felt that the rest of the people also do the same thing that is why they accepted three different actors for Ridhhima. But this article has actually changed my direction of thinking, and if this is true that the majority idolize the actors more than the characters I must add that this is nothing but foolishness. Just for the fact that the characters are fictitious and are very well sketched out to be shown to the people. It is not necessary that the actors playing this character are the same. They may have similarities but it is not possible for both of them to be exactly the same. That is why I would like to add that people that are idolizing Karan Singh Grover are not wrong but they must realize the truth of his marriage. What he has done is not correct but we have no right to comment on his personal life. So it’s always better to idolize the character more because one can always imagine themselves in place of it and they can end up not being hurt even if the character changes its shades.

Coming to the story point of view where Niha says that we must carry on with our lives. In a way I do agree to this and also disagree. I at least wanted a happy ending to the love story of Armaan and Ridhhima and maybe then they could have faded the characters away. I think this solution would not have created so much of disappointment in the fans of the show. And yes whatever happens at the end of the day it’s just a show, so we need to believe in this thought and move ahead in our lives the way the show has moved on.

Well I guess whatever Niha has mentioned in the article is exactly what should be done. So I hope many will read it and try to follow what she is actually trying to say.

Well it’s sad news for all the DMG lovers. I am not really sure what exactly is going to happen, but yes it looks as if Armaan and Riddhima are not going to return to the show in the near future.

I have looking through the internet to check if I can get some news on what is going to happen in the show in the recent times to come. I came across two articles which have left me in a state of disappointment. In fact I am not sure why this is really happening. One of the articles speaks about Karan Singh Grover and his personal life problems, which is also one of the causes why we are not seeing him in the show for quite some time now. The article is here:

” The news of Karan Singh Grover and Shraddha Nigam no longer being a couple, even before they celebrate their first wedding anniversary (December 2nd) has come as a shocker to the their fans..

However, Telly Buzz has dug in more information on what exactly went wrong in the married life of Karan and Shraddha.

It has been reported by all scribes that Karan’s closeness with Nicole was the reason for Shraddha calling off the marriage. However, there is more to it and here is what we found.

According to our source, “Shraddha has always been committed to the relationship, and has been very passionate when it came to supporting Karan in all ways possible. This was very much visible during the Jhalak days when Shraddha vociferously appealed for votes for her hubby in their official blog. However, this commitment was not there from Karan’s side, and he got too close to Nicole ever since his Jhalak days”.

However, the unknown factor about the whole drama is that it was not a triangle of sorts between Shraddha-Karan-Nicole, but there was one more girl involved. “In fact, Karan was going around with his close friend and co star of Dill Mill Gayye, Jennifer Winget too. Jennifer who was in love with Karan was made to believe that Karan would soon seek divorce from Shraddha and marry her. But Jennifer had no idea about the impending danger coming from Nicole too”.

Our source adds, “Karan on one hand was having gala time with Nicole outside, and pretended to be in love with Jennifer too at his work place. At home, there was Shraddha who doted on him a lot. However, things went berserk when Jennifer got to know about Nicole’s presence in Karan’s life, and that is when she confronted him on the sets of Dill Mill Gayye”.

Confirming this news, our source from the sets of Dill Mill Gayye on terms of anonymity told us, “When Jennifer got to know about Nicole, she slapped Karan hard on his cheeks and just fumed out of the sets. These incidents did not happen now, this was months back. And after this, Karan and Jennifer could not look into each others’ eye, and would come and shoot their scenes separately. But this could not go on for long, as the story had to focus on their love scenes too. This is the main reason why the new interns were roped in, as Jennifer down the line, found it very tough to even come to the sets”.

In the midst of all this, even Shraddha decided to part ways with Karan. “Karan and Shraddha filed for a divorce months back, and just last week, their divorce got granted. Shraddha even today continues to stay at Karan’s place, but she is really heartbroken. She has not yet come to terms with whatever has happened in her life in the past few months. Karan has now moved to Nicole’s place”, adds our source.

We tried our best to trace Karan’s new number, but could not get it. We got in touch with Karan’s manager, who stated that nothing was wrong in Karan and Shraddha’s life. But when we asked for Karan’s new number, she refused to give it.

However, we got to talk to Nicole, who had her answer ready even before we had finished our question. “I really do not know what is happening in the life of Karan and Shraddha”. When asked about her linkup with Karan, she just had this to say, “No comments”.

We also tried calling Shraddha, and even sent her text messages. Eventually, she sent us a reply in text which read, “I would like to maintain my silence on this”.

Our repeated attempts to get in touch with Jennifer were in vain. We later got to know that she is right now in Goa, and is trying her best to get over the trauma that she has recently faced.

Well, with the entire picture before us, we can only say that we pity all the three girls who fell for Karan’s charisma and trusted him blindly….

Reporter: Ranjini Nair, Srividya Rajesh
Author: Srividya Rajesh  “

The second article I believe is even worse as this is said to be from the head of the Cinevistas production. Well according to this we might now be able to see Armaan and Riddhima again for a long time, maybe never again as well. Here it is:

” Dr. Armaan and Dr. Riddhima have not been seen in Star One’s Dill Mill Gayye. The news coming in indicates that they might not make it back to the show in the near future…

We all know that a gang of new interns have taken the place of the older ones in Star One’s Dill Mill Gayye, produced by Cinevistas. While we see the likes of Pankit Thakkar, Sonia Singh still in the show, the protagonists Karan Singh Grover aka Dr. Armaan and Jennifer Winget aka Riddhima are found missing even now!!

Earlier, a source from the production house had told us that Dr. Armaan and Dr. Riddhima will be making their comeback to the show some 5-10 episodes after the new interns enter. But now, things have taken a new turn, and it looks as though there is every possibility that Karan and Jennifer might not make it to the show again..

According to our source, “Karan is now busy with the COLORS show as well as his film. So it is very unlikely that he will be back. Further, the new track with the new interns in the first case had to be introduced mainly because the production house and channel were relying too much on Karan to give them dates. With Karan’s personal life too going for a toss, the actor has now changed his number and is not at all accessible”.

A source from the sets of DMG on terms of anonymity says, “I don’t think the channel EPs or even the production house have the new number of Karan. Also, they don’t see the need of getting him back to DMG now, because they have enough to play with, what with the new interns coming into the show. Above all, the show has always been focusing on the interns, and they would like to keep it that way”.

Though there is a buzz that Karan and Jennifer might start shooting very soon, Amitabh Raina, Creative Head of the show tells us, “As of now, we are focusing only on the new interns. We have not yet decided on the return of Karan and Jennifer. If the story track demands, we might get them back later”.

Yet another source informs us, “Karan has always been a pain when it came to giving the channel and production house the dates required. Whenever he did not turn up for shoots, they had to alter the scripts then and there, and insert a flashback sequence or a body double just to show his presence. The entry of the new interns was done keeping in mind the fact that Karan would now be even busier with his film shoot”.

Our source adds on, “There would be a meaning if we get both Karan and Jennifer back. If Karan does not get back and we get only Riddhima back into the show, then again the whole essence of the love story is lost. So there is lots to contemplate, and the coming weeks and months will give us a clearer picture of what is going to happen”.

While we could not trace the new number of Karan Singh Grover, we tried calling Jennifer Winget, but she too was unavailable. We did not even get a reply to our text messages.  “

Well both of the articles are shocking ones especially for the DMG lovers. One says that they will return after a long time while the one from the production house says that it will take a long time for them to return and their return will only depend on the circumstances that may arise in the coming months. So in short they may not return again and even if they do they will not in the coming months. This has left me a lot disappointed. I feel like giving up the idea of watching the show anymore. Maybe this can be a publicity stunt as well. But I have received this information from a source that at least I believe to be very much reliable. It has not been wrong many times. So this in fact has broken my heart even more.

I think this news will make the show lose a lot of fans. I think that is why all the news of Karan Sigh Grover and his divorce has suddenly surfaced. This may create a lot of fans to go against Karan and maybe they will expect his return to the show, at least this is what even I feel (Also mentioned in the second article). Another bad news is that from 19th October a new show Jaane Pehchaane se Yeh Ajnabbi is coming on air at 8:30 p.m. So that means it replaces Dill Mill Gayye. What exactly is going to happen of DMG from 19th is it going off air or is its time slot going to change. Well I believe after all this news mentioned earlier quite a lot of people will not be worried of this change as they might end up leaving watching the show. But maybe I would want to continue and that is why I am confused of what is going to happen to the show. With the new interns it does not look like as if the show will go off air. I have started to like the new interns somewhat especially Yuvraj. Jitu looked impressive in the start but now only looks repetitive. Naina has not been very impressive so far but I guess she might just pick up in near future. Tamanna has been disappointing as I guess the creative’s are trying to create her character like the one Shilpa Anand displayed as Riddhima. Karan Wahi has not been that good as Sid but I know his capabilities and I think he will definitely get to his own in some time. So in a way I would want to continue with the show but yes definitely the show has lost a lot of its magic in the recent time, and hopefully I will be able to regenerate it again. I am also hoping that Armaan and Riddhima come back to the show again, just being a bit optimistic even after pasting the two articles here. As they really were the life of the show and without them it is more of a dead show now. And maybe this is a cause for the drop in the show’s TRP and that is why they are replacing this show with a new one. Anyways all of this is very disappointing and I hope that we all will be able to hear a lot more good news in the coming times.

Completed My First Big Step in Blogging!!!

Posted: October 8, 2009 by Shishir Gupta in Uncategorized


I guess this picture says a lot about my journey as a blogger for the past one year. It’s had many ups and downs, but definitely it has been very exciting. It’s a great feeling today and I think it is similar to the one Neil Armstrong must have had after taking his first step on moon, that is why I have added this picture as I have just completed my first big step in Blogging.

Well it was exactly a year back that I started blogging or I can say I created this blog. Well for the kicks I started off with three blogs each one dedicated towards certain fields. Actually when I started I did not know much about the concept of tags and categories well that is why I started out with three different blogs, where actually my tags were written as categories and for different categories I had these three different blogs.

It was difficult to maintain all the blogs and then updating all of them every month was not easy, I did try it for six long months. Then after that I deleted the other two blogs and imported all of their posts here in this one. When I look down the memory lane, I can see that the last year of blogging has been very good. I have tried to catch the eye of the readers all around the world and I can say I have been successful though not as much as I thought I would be when I started off but yes the response definitely has been overwhelming. In fact my blogging has reduced in the last six months but the viewing of the blog has not reduced. In fact the last two months or so have been very good and I have been getting a very good response on the blog with the increased number of hits.

If I talk just about this blog I started it basically only for television shows and television personalities. This blog recorded a lot of hits from India, US, UK and Pakistan showing how famous the Indian shows are all around the world. In fact my sports blog got as many as 240 hits on 18th January, which has been a record in all my three blogs at that time. After my shift to this blog, the blog received as many as 205 hits on 23rd September, which is a record since then.

This blog in the past year has recorded “16296” hits while my other blogs the technical one had 4513 hits in about 5 months and my sports blog recorded 1823 hits in about 6 months of their being in existence. Although this was my first blog that I started with and the other two followed so my shift to this blog can be justified. Well after the shift in about last six months I have got as many as “11680” hits on this blog. Well 11680 hits in last 6 months and close to 23000 hits in my first year is okay I guess.  5 posts have received above 500 hits and they are Dill Mill Gayye – The new Riddhima has arrived!!! with 746 hits, Karan Singh Grover with 609 hits, Dill Mill Gayye with 606 hits, Dill Mill Gayye – New Interns Coming soon! with 564 hits,and Hip Hip Hurray with 505 hits. Also as many as 32 posts received over 100 hits. Well I think in about 60 posts 32 posts have received above a 100 hits is a very good sign for the blog. Well that indicates that a lot of the posts have been viewed and it’s not just a couple of them have been very famous.

As I said it has been difficult to maintain all the three of them together that is why at the end of first six months I decided to delete two of my blogs and transfer all the posts from them onto this blog as this was the first one that I created. Now for the past six months I just have had one blog to maintain and I really thought at the beginning that it would be a lot easier to update it regularly. But that has not been the story so far. I had written about 43 posts in the first six months (when I had three different blogs) and since then I have just written about 17 posts (with only a single blog to update). Maybe I just ran out of topics to update but I think the main cause of this has been that I was a lot busy in the last six months, but definitely I have always tried to update at least one post every month if not more. I sincerely hope that the kind of response I got in the first year I would be able to generate in the coming year also in fact even more. I will try to be a lot more regular in updating and that is why I have asked one of my very good friends Mihir Patel to join this blog as an author. He basically will be posting a few computer based topics (technical articles). I guess I needed him a lot since I have not been able to post any technical article for a long time now (7 months to be precise that is not even a single one in the last six months). Well I think I have been concentrating on television shows more in the past six months. Mihir just posted his first last week, and I hope that he too will be regular on the blog.

It’s a year that has been completed or I can say my blog has completed a revolution around the sun. So I think the next picture is very much relevant to the status of the blog as of now. It’s one year over and my blog is celebrating its first birthday, and definitely counting for many more to come. I had definitely made a few mistakes in my first six months, but since then I have been a lot more responsible and that can also be one of the reasons why I have not been able to update more in the last six months. I hope that I can continue the good work and hopefully I will be able to attract a lot of people to my writings in the coming year.


A web application consists of web components, static resource files such as images, and helper classes and libraries. In the Java 2 platform, web components provide the dynamic extension capabilities for a web server.

Web Components :

  • Java Servlets
  • JSP
  • Web Services endpoint

Web Container :

  • Web components are supported by the services of a runtime platform called a web container.
  • A web container provides services such as request dispatching, security, concurrency, and life-cycle management. It also gives web components access to APIs such as naming, transactions, and email.

Web application deployment descriptor (DD) : The configuration information is maintained in a text file in XML format called a web application deployment descriptor.

Java Web Application Request Handling

Java Web Application Request Handling

Java Web Application Technologies

Java Web Application Technologies

Java Web Application Technologies

Servlets are Java programming language classes that dynamically process requests and construct responses.

Servlets are best suited for service-oriented applications (web service endpoints are implemented as servlets) and the control functions of a presentation-oriented application, such as dispatching requests and handling nontextual data.

JSP pages are text-based documents that execute as servlets but allow a more natural approach to creating static content.

JSP pages are more appropriate for generating text-based markup such as HTML, Scalable Vector Graphics (SVG), Wireless Markup Language (WML), and XML.

Web Application Life Cycle

The process for creating, deploying, and executing a web application can be summarized as follows :

1. Develop the web component code.
2. Develop the web application deployment descriptor.
3. Compile the web application components and helper classes referenced by the components.
4. Optionally package the application into a deployable unit.
5. Deploy the application into a web container.
6. Access a URL that references the web application.

Web Module

Web Resources : In the Java EE architecture, web components and static web content files such as images are called web resources.

Web Module : A web module is the smallest deployable and usable unit of web resources.

In addition to web components and web resources, a web module can contain other files :

  • Server-side utility classes (database beans, shopping carts, and so on). Often these classes conform to the JavaBeans component architecture.
  • Client-side classes (applets and utility classes).

Structure of Web Module

Top level directory is – Document Root of the application

Document Root contains :

  1. JSP pages
  2. Client side classes and archives
  3. Static web resources, such as images
  4. WEB-INF (Sub Directory) contains –
    • web.xml : The web application deployment descriptor
    • Tag library descriptor files
    • classes : A directory that contains server-side classes: servlets, utility classes, and JavaBeans components
    • tags : A directory that contains tag files, which are implementations of tag libraries
    • lib : A directory that contains JAR archives of libraries called by server-side classes

If your web module does not contain any servlets, filter, or listener components then it does not need a web application deployment descriptor.

You can also create application-specific subdirectories in –

  • document root or
  • WEB-INF/classes/ directory

You can deploy Web Module into any web container that conforms to the Java Servlets Specification.

To deploy a WAR on the Application Server, the file must also contain a Runtime Deployment Descriptor.

Runtime Deployment Descriptor : The runtime deployment descriptor is an XML file that contains information such as the context root of the web application and the mapping of the portable names of an application’s resources to the Application Server’s resources.

The Application Server web application runtime DD is named sun-web.xml and is located in the WEB-INF directory along with the web application DD.

Web Module Structure

Web Module Structure

Packaging Web Modules
To build the hello1 application with NetBeans IDE, follow these instructions :

  1. Select File?Open Project.
  2. In the Open Project dialog, navigate to tut-install/javaeetutorial5/examples/web/
  3. Select the hello1 folder.
  4. Select the Open as Main Project check box.
  5. Click Open Project.
  6. In the Projects tab, right-click the hello1 project and select Build.

To build the hello1 application using the Ant utility, follow these steps:

  1. In a terminal window, go to tut-install/javaeetutorial5/examples/web/hello1/.
  2. Type ant. This command will spawn any necessary compilations, copy files to the tut-install/javaeetutorial5/examples/web/hello1/build/ directory, create the WAR file, and copy it to the tut-install/javaeetutorial5/examples/web/hello1/dist/ directory.

Deploying a WAR File
Context Root : A context root identifies a web application in a Java EE server.

  • You specify the context root when you deploy a web module.
  • A context root must start with a forward slash (/) and end with a string.

Setting the Context Root :
In a packaged web module for deployment on the Application Server, the context root is stored in sun-web.xml.
To edit the context root, do the following :

  1. Expand your project tree in the Projects pane of NetBeans IDE.
  2. Expand the Web Pages and WEB-INF nodes of your project.
  3. Double-click sun-web.xml.
  4. In the editor pane, click Edit As XML.
  5. Edit the context root, which is enclosed by the context-root element.

You can deploy a WAR file to the Application Server in a 4 ways:

  • Copying the WAR into the domain-dir/autodeploy/ directory.
  • Using the Admin Console.
  • By running asadmin or ant to deploy the WAR.
  • Using NetBeans IDE.

Deploying a Packaged Web Module
If you have deployed the hello1 application, before proceeding with this section, undeploy the application by following one of the procedures described in Undeploying Web Modules.

Deploying with the Admin Console

  1. Expand the Applications node.
  2. Select the Web Applications node.
  3. Click the Deploy button.
  4. Select the radio button labeled “Package file to be uploaded to the Application Server.”
  5. Type the full path to the WAR file (or click on Browse to find it), and then click the OK button.
  6. Click Next.
  7. Type the application name.
  8. Type the context root.
  9. Select the Enabled box.
  10. Click the Finish button.

Deploying with asadmin
To deploy a WAR with asadmin, open a terminal window or command prompt and execute
=> asadmin deploy full-path-to-war-file

Deploying with Ant
To deploy a WAR with the Ant tool, open a terminal window or command prompt in the directory where you built and packaged the WAR, and execute
=> ant deploy

Deploying with NetBeans IDE
To deploy a WAR with NetBeans IDE, do the following:

  1. Select File?Open Project.
  2. In the Open Project dialog, navigate to your project and open it.
  3. In the Projects tab, right-click the project and select Undeploy and Deploy.

Testing Deployed Web Modules

  • By default, the application is deployed to host localhost on port 8080.
  • The context root of the web application is hello1 suppose.

To test the application, follow these steps:

  1. Open a web browser.
  2. Enter the following URL in the web address box : http://localhost:8080/hello1
  3. Enter your name, and click Submit.

Listing Deployed Web Modules
To use the Admin Console :

  1. Open the URL http://localhost:4848/asadmin in a browser.
  2. Expand the nodes Applications?Web Applications.

Use the asadmin command as asadmin list-components

Updating Web Modules

  1. Recompile any modified classes.
  2. If you have deployed a packaged web module, update any modified components in the WAR.
  3. Redeploy the module.
  4. Reload the URL in the client.

Dynamic Reloading

  • If dynamic reloading is enabled, you do not have to redeploy an application or module when you change its code or deployment descriptors.
  • This capability is useful in a development environment, because it allows code changes to be tested quickly.
  • Not recommended for a production environment, however, because it may degrade performance.

To enable dynamic reloading, use the Admin Console:

  1. Select the Applications Server node.
  2. Select the Advanced tab.
  3. Check the Reload Enabled box to enable dynamic reloading.
  4. Enter a number of seconds in the Reload Poll Interval field to set the interval at which applications and modules are checked for code changes and dynamically reloaded.
  5. Click the Save button.

In addition, to load new servlet files or reload deployment descriptor changes, you must do the following:

  1. Create an empty file named .reload at the root of the module :
  2. Explicitly update the .reload file’s time stamp each time you make these changes. On UNIX, execute
    touch .reload

For JSP pages, changes are reloaded automatically at a frequency set in the Reload Poll Interval field. To disable dynamic reloading of JSP pages, set the Reload Poll Interval field value to –1.

Undeploying Web Modules
To use NetBeans IDE:

  1. Ensure the Sun Java System Application Server is running.
  2. In the Runtime window, expand the Sun Java System Application Server instance and the node containing the application or module.
  3. Right-click the application or module and choose Undeploy.

To use the Admin Console:

  1. Open the URL http://localhost:4848/asadmin in a browser.
  2. Expand the Applications node.
  3. Select Web Applications.
  4. Click the check box next to the module you wish to undeploy.
  5. Click the Undeploy button.

Use the asadmin command as asadmin undeploy context-root
To use the Ant tool, execute the following command in the directory where you built and packaged the WAR:
ant undeploy”

Configuring Web Applications

Mapping URLs to Web Components
When a request is received by the web container it must determine which web component should handle the request. It does so by mapping the URL path contained in the request to a web application and a web component.

A URL path contains the context root and an alias

The Component Alias

  1. The alias identifies the web component that should handle a request.
  2. The alias path must start with a forward slash (/) and end with a string or a wildcard expression with an extension (for example, *.jsp).
  3. Since web containers automatically map an alias that ends with *.jsp, you do not have to specify an alias for a JSP page unless you wish to refer to the page by a name other than its file name.

Declaring Welcome Files

  1. The welcome files mechanism allows you to specify a list of files that the web container will use for appending to a request for a URL (called a valid partial request) that is not mapped to a web component.
  2. If a web container receives a valid partial request, the web container examines the welcome file list and appends to the partial request each welcome file in the order specified and checks whether a static resource or servlet in the WAR is mapped to that request URL. The web container then sends the request to the first resource in the WAR that matches.
  3. If no welcome file is specified, the Application Server will use a file named index.XXX, where XXX can be html or jsp, as the default welcome file. If there is no welcome file and no file named index.XXX, the Application Server returns a directory listing.

To specify a welcome file in the web application deployment descriptor, do the following:

  • Open web.xml
  • Specify the JSP pages using welcome-file elements and include these elements inside a welcome-file-list element. The welcome-file element defines the JSP page to be used as the welcome page.

Setting Initialization Parameters
You can pass initialization parameters to the context or to a web component.

To add a context parameter, do the following:

  1. Open web.xml.
  2. Using the following elements to add a context parameter
    • A param-name element that specifies the context object
    • A param-value element that specifies the parameter to pass to the context object
    • A context-param element that encloses the previous two elements

To add a web component initialization parameter, do the following:

  1. Open web.xml.
  2. Using the following elements to add a context parameter
    • A param-name element that specifies the name of the initialization parameter
    • A param-value element that specifies the value of the initialization parameter
    • An init-param element that encloses the previous two elements

Mapping Errors to Error Screens
When an error occurs during execution of a web application, you can have the application display a specific error screen according to the type of error.

To set up error mappings, do the following:

  1. Open web.xml
  2. Using the following elements
    • An exception-type element specifying either the exception or the HTTP status code that will cause the error page to be opened.
    • A location element that specifies the name of a web resource to be invoked when the status code or exception is returned. The name should have a leading forward slash (/).
    • An error-page element that encloses the previous two elements.
      You can have multiple error-page elements in your deployment descriptor.

Declaring a Reference to a Resource

  1. The @Resource annotation is used to declare a reference to a resource such as a data source, an enterprise bean, or an environment entry.
  2. This annotation is equivalent to declaring a resource-ref element in the deployment descriptor.
  3. The @Resource annotation is specified on a class, method or field.
  4. The container is responsible for injecting references to resources declared by the @Resource annotation and mapping it to the proper JNDI resources.


@Resource javax.sql.DataSource catalogDS;

public getProductsByCategory() {
// get a connection and execute the query
Connection conn = catalogDS.getConnection();


If you have multiple resources that you need to inject into one component, you need to use the @Resources annotation to contain them, as shown by the following example

@Resources ({
@Resource (name=”myDB” type=java.sql.DataSource),
@Resource(name=”myMQ” type=javax.jms.ConnectionFactory)

Declaring a Reference to a Web Service

  1. The @WebServiceRef annotation provides a reference to a web service.
  2. WebServiceRef uses the wsdlLocation element to specify the URI of the deployed service’s WSDL file.



public class ResponseServlet extends HTTPServlet {
static HelloService service;