Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » using crossContext
using crossContext [message #165838] Tue, 04 April 2006 09:48 Go to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
Hello,
I'm using WTP (wtp-I-I200603302119-200603302119.zip)with tomcat.
I've put this in Context1's web.xml:
<?xml version="1.0" encoding="UTF-8"?>

<Context crossContext="true">

</Context>

In my code I have:

RequestDispatcher requestDispatcher =
servletContext.getRequestDispatcher("/Context2");

But requestDispatcher is always null. Any idea why?

Thanks,

Zohar.
Re: using crossContext [message #165916 is a reply to message #165838] Wed, 05 April 2006 02:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ozkologlu.nowhere.com

Zohar,

You may not have the correct permissions to set up. try setting the
attribute:
privileged="true"
in <Context ...>

Not sure - but you may have crossContext in the wrong context
ie put crossContext="true" in /Context2

hth
Oz

"Zohar" <david_fire4@hotmail.com> wrote in message
news:e0tfct$k2f$1@utils.eclipse.org...
> Hello,
> I'm using WTP (wtp-I-I200603302119-200603302119.zip)with tomcat.
> I've put this in Context1's web.xml:
> <?xml version="1.0" encoding="UTF-8"?>
>
> <Context crossContext="true">
>
> </Context>
>
> In my code I have:
>
> RequestDispatcher requestDispatcher =
> servletContext.getRequestDispatcher("/Context2");
>
> But requestDispatcher is always null. Any idea why?
>
> Thanks,
>
> Zohar.
>
>
Re: using crossContext [message #165934 is a reply to message #165916] Wed, 05 April 2006 09:14 Go to previous messageGo to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
Did not help.
The RequestDispatcher's requestURI field is set to "Context2/Context1"
Anything else?

"Oz Kologlu" <ozkologlu@nowhere.com> wrote in message
news:e0vauq$j9k$1@utils.eclipse.org...
> Zohar,
>
> You may not have the correct permissions to set up. try setting the
> attribute:
> privileged="true"
> in <Context ...>
>
> Not sure - but you may have crossContext in the wrong context
> ie put crossContext="true" in /Context2
>
> hth
> Oz
>
> "Zohar" <david_fire4@hotmail.com> wrote in message
> news:e0tfct$k2f$1@utils.eclipse.org...
>> Hello,
>> I'm using WTP (wtp-I-I200603302119-200603302119.zip)with tomcat.
>> I've put this in Context1's web.xml:
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <Context crossContext="true">
>>
>> </Context>
>>
>> In my code I have:
>>
>> RequestDispatcher requestDispatcher =
>> servletContext.getRequestDispatcher("/Context2");
>>
>> But requestDispatcher is always null. Any idea why?
>>
>> Thanks,
>>
>> Zohar.
>>
>>
>
>
Re: using crossContext [message #165975 is a reply to message #165934] Wed, 05 April 2006 22:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ozkologlu.nowhere.com

Zohar,

Have a look at:
http://www.jguru.com/forums/view.jsp?EID=1022541
Should solve your problem

Oz

"Zohar" <david_fire4@hotmail.com> wrote in message
news:e101pf$7gq$1@utils.eclipse.org...
> Did not help.
> The RequestDispatcher's requestURI field is set to "Context2/Context1"
> Anything else?
>
> "Oz Kologlu" <ozkologlu@nowhere.com> wrote in message
> news:e0vauq$j9k$1@utils.eclipse.org...
>> Zohar,
>>
>> You may not have the correct permissions to set up. try setting the
>> attribute:
>> privileged="true"
>> in <Context ...>
>>
>> Not sure - but you may have crossContext in the wrong context
>> ie put crossContext="true" in /Context2
>>
>> hth
>> Oz
>>
>> "Zohar" <david_fire4@hotmail.com> wrote in message
>> news:e0tfct$k2f$1@utils.eclipse.org...
>>> Hello,
>>> I'm using WTP (wtp-I-I200603302119-200603302119.zip)with tomcat.
>>> I've put this in Context1's web.xml:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <Context crossContext="true">
>>>
>>> </Context>
>>>
>>> In my code I have:
>>>
>>> RequestDispatcher requestDispatcher =
>>> servletContext.getRequestDispatcher("/Context2");
>>>
>>> But requestDispatcher is always null. Any idea why?
>>>
>>> Thanks,
>>>
>>> Zohar.
>>>
>>>
>>
>>
>
>
Re: using crossContext [message #166024 is a reply to message #165975] Thu, 06 April 2006 08:14 Go to previous message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
This worked:
servletContext.getContext("/Context2").getRequestDispatcher( "/Servlet");

"Oz Kologlu" <ozkologlu@nowhere.com> wrote in message
news:e11gsv$hq$1@utils.eclipse.org...
> Zohar,
>
> Have a look at:
> http://www.jguru.com/forums/view.jsp?EID=1022541
> Should solve your problem
>
> Oz
>
> "Zohar" <david_fire4@hotmail.com> wrote in message
> news:e101pf$7gq$1@utils.eclipse.org...
>> Did not help.
>> The RequestDispatcher's requestURI field is set to "Context2/Context1"
>> Anything else?
>>
>> "Oz Kologlu" <ozkologlu@nowhere.com> wrote in message
>> news:e0vauq$j9k$1@utils.eclipse.org...
>>> Zohar,
>>>
>>> You may not have the correct permissions to set up. try setting the
>>> attribute:
>>> privileged="true"
>>> in <Context ...>
>>>
>>> Not sure - but you may have crossContext in the wrong context
>>> ie put crossContext="true" in /Context2
>>>
>>> hth
>>> Oz
>>>
>>> "Zohar" <david_fire4@hotmail.com> wrote in message
>>> news:e0tfct$k2f$1@utils.eclipse.org...
>>>> Hello,
>>>> I'm using WTP (wtp-I-I200603302119-200603302119.zip)with tomcat.
>>>> I've put this in Context1's web.xml:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <Context crossContext="true">
>>>>
>>>> </Context>
>>>>
>>>> In my code I have:
>>>>
>>>> RequestDispatcher requestDispatcher =
>>>> servletContext.getRequestDispatcher("/Context2");
>>>>
>>>> But requestDispatcher is always null. Any idea why?
>>>>
>>>> Thanks,
>>>>
>>>> Zohar.
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Previous Topic:Server configuration renaming
Next Topic:methods in dependent package, WTP 1.0, Eclipse 3.1.2
Goto Forum:
  


Current Time: Tue Sep 24 15:25:32 GMT 2024

Powered by FUDForum. Page generated in 0.03686 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top