Hai every one !!!!!!!!!!!!!!!

Hi all,

Am trying to call a servlet from another servlet.

i used request dispatcher, but that is not working fine. It works fine only with jsp pages...

ServletContext sc=getServletContext();

RequestDispatcher rd=sc.getRequestDispatcher("/xldetails.jsp");

rd.forward(req,res);

so i tried with response.sendRedirect.

try

{

String url= "http://localhost:7001/webApp/";

...............

..............

response.sendRedirect(url+"req_dispatcher");

}

i don know where i am wrong . so can any one help me out.

waiting for ur repy eagerly !!!!!!!!!!!

thank you ,

san.da...

[691 byte] By [san.da...a] at [2007-10-2 20:17:27]
# 1
> i used request dispatcher, but that is not working> fine. It works fine only with jsp pages...What is the exact problem? Any error?
SidGatea at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 2

Hi SidGate,

Thanks for ur immediate reply.

after many trials ,i don know how, but the code is working fine.

first i got 404 error.

i used this only.

ServletContext sc=getServletContext();

RequestDispatcher rd=sc.getRequestDispatcher("/req_dispatcher");

rd.forward(req,response);

thank u very much,

san.da...

san.da...a at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 3
Hai * r u familiar with web.xml?* do u know that there r 2 methods for getting 1 RequestDispatcher, ServletContext and ServletResponse?* r u havng 1 doubt abt difference between 2?* do u know where I can find good dosa?
filestreama at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 4
filestream, pls do the needful.
dubwaia at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 5

> filestream, pls do the needful.

Hai my friend. I was going to provide the OP with some examples but then I thought of the old adage, "Give a man a fish, you have fed him today. Teach a man to fish and he'll buy a new bass boat with a 200HP Evinrude."

And you know how kind I am, I didn't want the OP to get in trouble with his wife for bring home a new boat and the last season's BassMasters on DVD, so I figured I better not.

How's the home improvement stuff coming along?

filestreama at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 6

> > filestream, pls do the needful.

>

> Hai my friend. I was going to provide the OP with

> some examples but then I thought of the old adage,

> "Give a man a fish, you have fed him today. Teach a

> man to fish and he'll buy a new bass boat with a

> 200HP Evinrude."

>

> And you know how kind I am, I didn't want the OP to

> get in trouble with his wife for bring home a new

> boat and the last season's BassMasters on DVD, so I

> figured I better not.

>

> How's the home improvement stuff coming along?

Never ending. So have you been reading the news?

dubwaia at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 7

> > > filestream, pls do the needful.

> >

> > Hai my friend. I was going to provide the OP with

> > some examples but then I thought of the old adage,

> > "Give a man a fish, you have fed him today. Teach

> a

> > man to fish and he'll buy a new bass boat with a

> > 200HP Evinrude."

> Never ending. So have you been reading the news?

Are you referring to the article on "tutors?"

filestreama at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 8
> Are you referring to the article on "tutors?"I don't think so. I mean the one about where I work.
dubwaia at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 9
> > Are you referring to the article on "tutors?"> > I don't think so. I mean the one about where I work.I'm not sure if I remember where you work. Is it the autoparts store or E&E?
filestreama at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 10
He's up in Buffalo, is he?
abillconsla at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 11

> > > Are you referring to the article on "tutors?"

> >

> > I don't think so. I mean the one about where I

> work.

>

> I'm not sure if I remember where you work. Is it the

> autoparts store or E&E?

I don't even know what E& E is. I thought you sit next to my old coworker.

dubwaia at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...
# 12

> > > > Are you referring to the article on "tutors?"

> > >

> > > I don't think so. I mean the one about where I

> > work.

> >

> > I'm not sure if I remember where you work. Is it

> the

> > autoparts store or E&E?

>

> I don't even know what E& E is. I thought you sit

> next to my old coworker.

I used to. They moved said coworker to another floor and moved me a few cubicles away because they hired...get this...MORE Management!

Do you still have my work email address? You can shoot me an email there.

filestreama at 2007-7-13 22:59:55 > top of Java-index,Java Essentials,New To Java...