Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » enabling JSP 2.0+ support
enabling JSP 2.0+ support [message #142948] Sun, 09 October 2005 16:12 Go to next message
Eclipse UserFriend
Originally posted by: alantn.hotmail.com

I'm trying out the PetStore example from Apache Beehive project. Mostly
everything compiled fine but there's one problem:

<netui:anchor action="begin">
<img src="${pageContext.request.contextPath}/images/arrow.gif" border=0
/> ${bundle.view.buttonCancel}
</netui:anchor>

The error I'm getting is: the method contextPath() is undefined for the
type servletRequest.

I've enabled Java Compiler to use compliance level 5.0. but the problem
still exist. Tomcat v5.5 runtime was added to the project. JRE is
JDK1.5.0_05.

Can someone please tell me what I need to do so JSP 2.0+ enabled as
well? This is a requirement for beehive 1.0 NetUI. Thanks.
Re: enabling JSP 2.0+ support [message #143041 is a reply to message #142948] Mon, 10 October 2005 13:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erickson_d.yahoo.removethis.com

I ran into this too. I think it's because WTP thinks that
pageContext.request is a ServletRequest, unaware of the subclass. I
think there is a validation option you can use to shut this off.

In general, support in WTP for JSP 2.0 is really sketchy. For example,
it doesn't support tag files very well, not all JSP standard actions are
implemented, and there are numerous bugs with encoding detection.

Alan N wrote:
> I'm trying out the PetStore example from Apache Beehive project. Mostly
> everything compiled fine but there's one problem:
>
> <netui:anchor action="begin">
> <img src="${pageContext.request.contextPath}/images/arrow.gif"
> border=0 /> ${bundle.view.buttonCancel}
> </netui:anchor>
>
> The error I'm getting is: the method contextPath() is undefined for the
> type servletRequest.
>
> I've enabled Java Compiler to use compliance level 5.0. but the problem
> still exist. Tomcat v5.5 runtime was added to the project. JRE is
> JDK1.5.0_05.
>
> Can someone please tell me what I need to do so JSP 2.0+ enabled as
> well? This is a requirement for beehive 1.0 NetUI. Thanks.
Re: enabling JSP 2.0+ support [message #143477 is a reply to message #142948] Thu, 13 October 2005 15:27 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Alan N wrote:
> <img src="${pageContext.request.contextPath}/images/arrow.gif"
>
> The error I'm getting is: the method contextPath() is undefined for the
> type servletRequest.

This is a known bug, #101871.

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=101871

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: enabling JSP 2.0+ support [message #144828 is a reply to message #143477] Fri, 21 October 2005 17:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.craigcondit.com

Nitin Dahyabhai wrote:
> Alan N wrote:
>
>> <img src="${pageContext.request.contextPath}/images/arrow.gif"
>> The error I'm getting is: the method contextPath() is undefined for
>> the type servletRequest.
>
>
> This is a known bug, #101871.
>
> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=101871
>

One workaround I've used:

${pageContext['request'].contextPath}


Yes, it's ugly but it does keep WTP from complaining.
Re: enabling JSP 2.0+ support [message #145564 is a reply to message #144828] Sat, 29 October 2005 01:30 Go to previous messageGo to next message
Mike Dalrymple is currently offline Mike DalrympleFriend
Messages: 5
Registered: July 2009
Junior Member
Just out of curiousity is there any reason you wouldn't use the core URL
tag?

<img src="<c:url value="/images/arrow.gif"/>">

And if you're doing a JSP Document (i.e. nested tags don't jive) I
think you can do this:

<c:url var="arrowImgUrl" value="/images/arrow.gif"/>
<img src="${arrowImgUrl}"/>

I use the first instance successfully, I haven't had a need to try the
second just yet.

Craig Condit wrote:
> Nitin Dahyabhai wrote:
>
>> Alan N wrote:
>>
>>> <img src="${pageContext.request.contextPath}/images/arrow.gif"
>>> The error I'm getting is: the method contextPath() is undefined for
>>> the type servletRequest.
>>
>>
>>
>> This is a known bug, #101871.
>>
>> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=101871
>>
>
> One workaround I've used:
>
> ${pageContext['request'].contextPath}
>
>
> Yes, it's ugly but it does keep WTP from complaining.
Re: enabling JSP 2.0+ support [message #146529 is a reply to message #145564] Tue, 08 November 2005 15:14 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.craigcondit.com

Readability mainly. Also, I've noticed that some JSTL implementations
(can't remember which ones) generate improper XHTML links with multiple
params (& instead of &amp;).

Mike Dalrymple wrote:
> Just out of curiousity is there any reason you wouldn't use the core URL
> tag?
>
> <img src="<c:url value="/images/arrow.gif"/>">
>
> And if you're doing a JSP Document (i.e. nested tags don't jive) I
> think you can do this:
>
> <c:url var="arrowImgUrl" value="/images/arrow.gif"/>
> <img src="${arrowImgUrl}"/>
>
> I use the first instance successfully, I haven't had a need to try the
> second just yet.
>
> Craig Condit wrote:
>
>> Nitin Dahyabhai wrote:
>>
>>> Alan N wrote:
>>>
>>>> <img src="${pageContext.request.contextPath}/images/arrow.gif"
>>>> The error I'm getting is: the method contextPath() is undefined for
>>>> the type servletRequest.
>>>
>>>
>>>
>>>
>>> This is a known bug, #101871.
>>>
>>> See https://bugs.eclipse.org/bugs/show_bug.cgi?id=101871
>>>
>>
>> One workaround I've used:
>>
>> ${pageContext['request'].contextPath}
>>
>>
>> Yes, it's ugly but it does keep WTP from complaining.
Previous Topic:ClassNotFoundException with WTP 1.0 I
Next Topic:weblogin vs tomcat
Goto Forum:
  


Current Time: Fri Apr 26 22:58:52 GMT 2024

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

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

Back to the top