Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Context Assistant on JSP Expression Language dot operators
Context Assistant on JSP Expression Language dot operators [message #523042] Wed, 24 March 2010 16:43 Go to next message
Eclipse UserFriend
Although I've never seen it working, there seem to be people (in google Smile) who have seen it working: a context assistant for JSP Expression language.

Thus CMD-space (mac) or Windowsbutton-Space (windows) hit it on the dot.... and see what is possible:

${pageContext. }

How do I configure Eclipse / WTP in such that it works? Or is it impossible right now?
Re: Context Assistant on JSP Expression Language dot operators [message #523153 is a reply to message #523042] Thu, 25 March 2010 07:34 Go to previous messageGo to next message
Eclipse UserFriend
Wil,

JSP EL content assist scenarios have been greatly improved in WTP 3.2. There was limited support for EL content assist in WTP 3.1. But if I remember correctly one major limitation in WTP 3.1 was that it only worked when the EL was in a tag attribute value region and would not work if the EL was just in the body of a tag.

Blue Skies,

~Ian
Re: Context Assistant on JSP Expression Language dot operators [message #523356 is a reply to message #523153] Fri, 26 March 2010 02:24 Go to previous messageGo to next message
Eclipse UserFriend
We do have limitation in EL content assist support in WTP 3.2 as well. Content assist on dot operator never works for pageContext like this: ${pageContext. }
Re: Context Assistant on JSP Expression Language dot operators [message #523365 is a reply to message #523356] Fri, 26 March 2010 04:11 Go to previous messageGo to next message
Eclipse UserFriend
Thnx.

What will work? Could you show me some examples?

Ps. In netbeans it works on dot operators, a great benifit while programming JSP with expression language, will this be introduced later?
Re: Context Assistant on JSP Expression Language dot operators [message #523396 is a reply to message #523356] Fri, 26 March 2010 06:11 Go to previous messageGo to next message
Eclipse UserFriend
Sarika Sinha wrote on Fri, 26 March 2010 02:24
We do have limitation in EL content assist support in WTP 3.2 as well. Content assist on dot operator never works for pageContext like this: ${pageContext. }
That is the one case that does work in WTP 3.2, or at least it should be. There are JUnits that specifically test for that.

Wil wrote on Fri, 26 March 2010 04:11
Thnx.

What will work? Could you show me some examples?

Ps. In netbeans it works on dot operators, a great benifit while programming JSP with expression language, will this be introduced later?
The example that should work in WTP 3.2 is ${pageContext.}, or really any dot operator on a variable. What does not work is variable completion.

Again I am not positive what was and was not working in WTP 3.1, but I do know EL support especially in content assist has been improved for WTP 3.2.

While it would be great to support it like a first class citizen like the JSP scriplet regions there are lots of issues with supporting EL especially because of translation and scoping issues. Also there are many more higher priority issues the core Structured Source Editor is working on. If there are any other specific issues with EL support you believe should be fixed you can find an existing bug for it in Bugzilla and vote on it, or if you are feeling very ambitious the team is always willing to review high quality patches from the community. I know there are already a hand full of Bugzillas open in this area, and I would mention the bug numbers here bug Bugzilla currently seems to be down for me.

If you have any further questions please feel free to ask.

Blue Skies,

~Ian

[Updated on: Fri, 26 March 2010 06:11] by Moderator

Re: Context Assistant on JSP Expression Language dot operators [message #523552 is a reply to message #523396] Fri, 26 March 2010 15:20 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ian,

I've downloaded build 20100318-1801 with the Eclipse Web Developer Tools 3.2.0.v200911160530-.... After creating a Dynamic Web Project, adding a JSP page in /WEB-INF/ and trying to use some of the implicit objects that JSP offers, I was unable to succeed using context assistant.

pageContext [${pageContext}]
pageScope [${pageScope}]
requestScope [${requestScope}]
sessionScope [${sessionScope}]
param [${param}]
paramValues [${paramValues}]
header [${header}]
headerValues [${headerValues}]
cookie [${cookie}]
initParam [${initParam}]

None of them works, using a dot operator, or even by just typing ${ }, I'm unable to get any tips from the context assistant. 'No default proposals' is what I keep getting.

Am I using it according to a way you would expect it to work now?

[Updated on: Fri, 26 March 2010 17:38] by Moderator

Re: Context Assistant on JSP Expression Language dot operators [message #523554 is a reply to message #523552] Fri, 26 March 2010 15:36 Go to previous messageGo to next message
Eclipse UserFriend
Wil wrote on Fri, 26 March 2010 15:20

I've downloaded build 20100318-1801 with the Eclipse Web Developer Tools 3.2.0.v200911160530-.... after creating a Dynamic Web Project, adding a JSP page in /WEB-INF/ and trying to use some of the implicit objects JSP offers you I was unable to succeed using context assistant.
That driver may not be new enough to have all the EL fixes that have gone into WTP 3.2. If you want to try the latest and greatest you can get our M6 driver from http://download.eclipse.org/webtools/downloads/.

Wil wrote on Fri, 26 March 2010 15:20
pageContext [${pageContext}]
pageScope [${pageScope}]
requestScope [${requestScope}]
sessionScope [${sessionScope}]
param [${param}]
paramValues [${paramValues}]
header [${header}]
headerValues [${headerValues}]
cookie [${cookie}]
initParam [${initParam}]

But on none of them using any dot operator, or even by just typing ${ }, I'm able to get any tips from the context assistant. 'No default proposals' I keep getting.

Not sure what you are saying here.
Wil wrote on Fri, 26 March 2010 15:20
Am I using it according to a way you would expect it to work now?
Steps that you would need to follow are:

  1. Create new DWP pointing at a server runtime such as Apache 6.0
  2. Create a JSP in the new DWP
  3. Add the line ${pageContext. } and invoke content assist after the dot

Let me know if you have any luck. Again this MAY work on the driver you have, but I do not remember when the relevant fixes went in. Possible before then so its worth giving a try on your current driver if you are doing something different then in my provided steps.

Blue Skies,

~Ian

[Updated on: Fri, 26 March 2010 15:37] by Moderator

Re: Context Assistant on JSP Expression Language dot operators [message #523559 is a reply to message #523554] Fri, 26 March 2010 16:32 Go to previous messageGo to next message
Eclipse UserFriend
I did not select a target runtime... that was the mistake.

Indeed, if I type ${pageContext. + ctrl-space (mac) now I get a full list of all thing I can do with it Very Happy

https://bugs.eclipse.org/bugs/attachment.cgi?id=163124

Again thank you.

[Updated on: Fri, 26 March 2010 17:40] by Moderator

Re: Context Assistant on JSP Expression Language dot operators [message #523561 is a reply to message #523559] Fri, 26 March 2010 16:40 Go to previous messageGo to next message
Eclipse UserFriend
Wil wrote on Fri, 26 March 2010 16:32
I did not select a target runtime... that was the mistake.
Yeah thats tricked me up too. Would you mind opening a Bugzilla about how you had issues with this and it would be nice if there was some sort of warning or message telling you that you will not get EL content assist without a target runtime? If you do open the bug then please report back here with the bug number for record keeping.

Blue Skies,

~Ian
Re: Context Assistant on JSP Expression Language dot operators [message #523564 is a reply to message #523561] Fri, 26 March 2010 17:23 Go to previous messageGo to next message
Eclipse UserFriend
Sure thing.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=307240
Re: Context Assistant on JSP Expression Language dot operators [message #632561 is a reply to message #523564] Wed, 13 October 2010 08:40 Go to previous messageGo to next message
Eclipse UserFriend
Will content assist also work if you define something with jsp:useBean, or is this only for the implicit ones like pageContext?
Re: Context Assistant on JSP Expression Language dot operators [message #632625 is a reply to message #632561] Wed, 13 October 2010 11:52 Go to previous messageGo to next message
Eclipse UserFriend
Erik Kristensen wrote on Wed, 13 October 2010 08:40
Will content assist also work if you define something with jsp:useBean, or is this only for the implicit ones like pageContext?


Currently, the editor really only supports pageContext it seems. It looks like this may be a bug, though.

Re: Context Assistant on JSP Expression Language dot operators [message #639010 is a reply to message #523042] Sun, 14 November 2010 12:56 Go to previous message
Eclipse UserFriend
Is this a known bug, which is currently tracked in Bugzilla that only pageContext is code-completed? I couldn't find an ID with that issue. To me this is a serious problem, since a lot of JSP developers use beans which they access via EL.
Previous Topic:Problem Using Eclipse WTP\Tomcat\CXF to Dev Web Service
Next Topic:Web Services
Goto Forum:
  


Current Time: Tue Jul 08 21:50:05 EDT 2025

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

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

Back to the top