Content assist behaving oddly for JSPs

View: New views
6 Messages — Rating Filter:   Alert me  

Content assist behaving oddly for JSPs

by JustJoc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I recently upgraded to Eclipse Galileo, and am now having trouble with content-assist in JSP pages in my existing projects.
The projects have been re-created doing a fetch from source control that doesn't hold any of the .????? files to ensure there is no conflict there (I dont know if this would be - never had to worry about it before).

In general tho, on any existing JSP files content assist doesn't work, I just get a beep and nothing happens. On any newly created JSP's it works perfectly.

Now for the bizarre twist - If I resave an existing JSP with a new name (just a simple save as and appending a 2 to the name), the content assist starts working in the old one.

Although its a workaround for now, its a highly frustrating one.

I have disabled the validation of JSP's as we have a number of JSP's in JSP's and just get endless errors for them - but that doesnt explain the save copy thing above?


Re: Content assist behaving oddly for JSPs

by NICHOLAS SANDONATO :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

Could you please open bugs (https://bugs.eclipse.org/bugs/enter_bug.cgi) making sure to document any errors you find in the logs, possibly example projects, etc to help recreate this problem?  The more information we get, the better.

Also, if you create the bug report about JSP validation, could you document what kind of validation errors you're seeing.

Thank you,
Nick



From: JustJoc <joconnor@...>
To: wtp-dev@...
Date: 06/29/2009 07:28 AM
Subject: [wtp-dev] Content assist behaving oddly for JSPs
Sent by: wtp-dev-bounces@...






I recently upgraded to Eclipse Galileo, and am now having trouble with
content-assist in JSP pages in my existing projects.
The projects have been re-created doing a fetch from source control that
doesn't hold any of the .????? files to ensure there is no conflict there (I
dont know if this would be - never had to worry about it before).

In general tho, on any existing JSP files content assist doesn't work, I
just get a beep and nothing happens. On any newly created JSP's it works
perfectly.

Now for the bizarre twist - If I resave an existing JSP with a new name
(just a simple save as and appending a 2 to the name), the content assist
starts working in the old one.

Although its a workaround for now, its a highly frustrating one.

I have disabled the validation of JSP's as we have a number of JSP's in
JSP's and just get endless errors for them - but that doesnt explain the
save copy thing above?


--
View this message in context:
http://www.nabble.com/Content-assist-behaving-oddly-for-JSPs-tp24252444p24252444.html
Sent from the Eclipse WTP - general mailing list archive at Nabble.com.

_______________________________________________
wtp-dev mailing list
wtp-dev@...
https://dev.eclipse.org/mailman/listinfo/wtp-dev



_______________________________________________
wtp-dev mailing list
wtp-dev@...
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Re: Content assist behaving oddly for JSPs

by JustJoc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for your quick response, and I will log a bug report when I have some useful detail thats worth logging, but at the moment there isn't much!

I have tried creating a small example project to show this, but with little success - and the project it occurs in is a little on the huge side (not that I'd be able to provide it either). Exactly the same problems have occured for everyone in my department who has tried Galileo.

We use exactly the same steps that I used on previous Eclipses (a mix of JBuilder2007, Europa and Ganymede).
After creating a new dynamic web app, setting up the build path, performing the checkout from Surround SCM overwriting anything there and then refreshing the project. There is one error in the only place I know to look (that being the Window->show view->error log).

The error is :-
The Java indexing could not index <path>/WebApp/WEB-INF/lib/icu4j.jar|com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class. This .class file doesn't follow the class file format specification. Please report this issue against the .class file vendor
but I dont think its likely this is to blame. . .

Is there anywhere else in particular I should look for logs relevant to this area of eclipse?

Thanks,

<< JOC >>

Re: Content assist behaving oddly for JSPs

by Nitin Dahyabhai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

JustJoc wrote:
> Is there anywhere else in particular I should look for logs relevant to this
> area of eclipse?

No, that's the right place.  Without knowing more about the
specifics, I couldn't tell you why JSP content assist isn't working.
  I can say that the embedded Java content assist won't work unless
you have the Servlet API on the Java Build Path somehow, and it can
be quirky in cases where no Java Source Folder is set on the project
(there's a bug reported for that already).  For finding and using
tag libraries, the editor expects they either be in Jar files
visible on the project's Java Build Path, or that the WEB-INF
folder's parent folder is a parent folder of the JSP file and the
tag library, or that you've formally defined the deployment layout
using the .settings/org.eclipse.wst.common.component file and have
the ModuleCoreNature on the project.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational

_______________________________________________
wtp-dev mailing list
wtp-dev@...
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Re: Content assist behaving oddly for JSPs

by JustJoc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I can say that the embedded Java content assist won't work unless
> you have the Servlet API on the Java Build Path somehow, and it can
> be quirky in cases where no Java Source Folder is set on the project

I do have the servlet api on the classpath (from JBoss4.0.3 which we are still stuck on), and content assist does work on new JSP files, just not in existing ones
BUT
if you open an existing JSP that isn't working with content assist, and re-save it using "save as", content assist works from that point onwards. (save doesn't work, it has to be "save as" and overwrite the original file). This is a good enough work around for now, but does this mean there is some metadata or cache that is being updated by "save as" that isn't changed by save?

<< JOC >>

Re: Content assist behaving oddly for JSPs

by Nitin Dahyabhai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


This is usually a last resort kind of option, but try shutting down Eclipse and removing the entire .metadata/.plugins/org.eclipse.jst.jsp.core directory from under your workspace.  Any cached JSP information would be in there and will automatically be rebuilt when needed.

Regards,
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational



JustJoc <joconnor@...>
Sent by: wtp-dev-bounces@...

07/02/2009 04:27 AM
Please respond to
"General discussion of project-wide or architectural issues."        <wtp-dev@...>

To
wtp-dev@...
cc
Subject
Re: [wtp-dev] Content assist behaving oddly for JSPs






> I can say that the embedded Java content assist won't work unless
> you have the Servlet API on the Java Build Path somehow, and it can
> be quirky in cases where no Java Source Folder is set on the project

I do have the servlet api on the classpath (from JBoss4.0.3 which we are
still stuck on), and content assist does work on new JSP files, just not in
existing ones
BUT
if you open an existing JSP that isn't working with content assist, and
re-save it using "save as", content assist works from that point onwards.
(save doesn't work, it has to be "save as" and overwrite the original file).
This is a good enough work around for now, but does this mean there is some
metadata or cache that is being updated by "save as" that isn't changed by
save?

<< JOC >>
--
View this message in context:
http://www.nabble.com/Content-assist-behaving-oddly-for-JSPs-tp24252444p24303076.html
Sent from the Eclipse WTP - general mailing list archive at Nabble.com.

_______________________________________________
wtp-dev mailing list
wtp-dev@...
https://dev.eclipse.org/mailman/listinfo/wtp-dev


_______________________________________________
wtp-dev mailing list
wtp-dev@...
https://dev.eclipse.org/mailman/listinfo/wtp-dev