- This topic has 13 replies, 4 voices, and was last updated 19 years, 12 months ago by
Thomas Weber.
-
AuthorPosts
-
gcstangMemberJava Code completion seems to work on some JSP pages and not on others.
Also there are no colors on Scriplet tags.What I know:
I’m using jdk 1.4.1_03
Eclipse 2.1
myeclipseide 2.1.1
HTML Code completion in the page works just Java (Scriptlet) completion does not.
Windows 2000 all latest fixes.They are set to read/write permission.
Scott AndersonParticipantDo you notice any difference between JSP’s where code completion works and those where it doesn’t?
Are they in the same directory or different ones?
Are you trying to get code completion to work on classes you don’t have import statements for? Are all JSP’s under the webroot?
Do the JSP’s all compile when you make a modification and save them?
Do they all have a .jsp suffix?
By the way, you can have the JSP editor add your imports automatically if you hit <ctrl>+space just after typing a classname within a scriptlet.
–Scott
MyEclipse Support
gcstangMemberI notice no difference in between JSP’s.
They are in the same directory.
I am doing a simple:
String tmp = null;
tmp.<awaiting code completion>They all have a .jsp suffix.
Scott AndersonParticipantCould the difference be “old” JSP’s that you imported or copied in vs. “new” JSPs you created after the web project was created?
Are all JSP’s under the webroot?
Do the JSP’s all compile when you make a modification and save them?
Have you tried a ‘Rebuild All’ on the project?
–Scott
MyEclipse Support
gcstangMemberNope the JSP’s are both old then prior to using myeclipseide.
They are all under the same webroot.
They all compile correctly.
If I make a declaration and it is incorrect after saving it tasks shows an error as does the jsp.I have tried the rebuild all and still the same.
Scott AndersonParticipantCan you post the smallest possible JSP that doesn’t seem to allow Java code assist so that we can try to run it down internally?
–Scott
MyEclipse Support
gcstangMemberThe code follows from a page that code assist does not work on.
This page is from a project that uses Tiles in the Struts framework.
All lines between the starting and ending lines only.*********START **********************
<%@ taglib uri=”struts-bean.tld” prefix=”bean” %>
<%@ taglib uri=”struts-html.tld” prefix=”html” %><!– start: admin-body.jsp –>
<br><br>
<table cellpadding=”0″ cellspacing=”0″ border=”0″>
<tr>
<td>
<span class=”companyTitle”><bean:message key=”company.title” /></span> Administration
<br/><br/>
Welcome to <span class=”companyTitle”><bean:message key=”company.title” /></span> Administration <br/>
Click on a link to the left to access the Administrative Functions
</td>
</tr>
</table>
<br><br><br>
<br><br><br><br>
<!– end: admin-body.jsp –>
*********END **********************Thank you for your help.
Scott AndersonParticipantSince I don’t have the struts taglibs installed, I tested by removing the two taglib lines at the top and changing the two bean:message tags to static scriptlet strings. Once I did this, I inserted multiple Java passages and code completion worked as expected.
Would you try exactly the same test under your web root? First, create a new JSP file containing only what you’ve presented here and see if completion works in it. Then, remove the taglib references, as I did, and try it again. Please let us know what you find.
–Scott
MyEclipse Support
gcstangMemberNope that didn’t work also I have contents from this page that does work just fine with struts declarations in it.
The name of this file is copyright.jsp the first file was admin-body.jsp
NOTE:
I tested a theory on this and it looks like its not the contents but the name of the files….looks like all files with hyphens in the name won’t work.**********START **************************
<%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %><!– start: copyright.jsp –>
<table align=”center”>
<tr>
<td>
<div class=”copyright” align=”center”>
<bean:message key=”copyright.title”/>
<span class=”companyTitle”><bean:message key=”company.title”/></span><br>
All Rights Reserved</div>
</td>
</tr>
</table>
</center>
<!– end: copyright.jsp –>
**********END ****************************
Scott AndersonParticipantlooks like all files with hyphens in the name won’t work.
That is exactly what the problem is. Nice work! I’ve entered this problem into our internal defect tracking system so that it can be addressed in the next release.
Thanks again for your persistence in helping us run this down. Sorry for the temporary inconvenience until we get it resolved.
–Scott
MyEclipse Support
gcstangMemberThank you for all of your help I believe your on track to a great product keep up the good work…I can’t speak for the whole community but I know I appreciate the work you’ve done so far.
–Gil
Scott AndersonParticipantGil,
And thank you from our whole team. These forums tend to draw the “problems” more than the “kudos”, but a kind word goes a long way in the development team.
–Scott
MyEclipse Support
bartelmeMemberI just wanted to add it seems filenames with spaces have this same problem. Using Eclipse 3.0 and MyEclipse 3.8.1 GA
Thomas WeberMemberSimiliar problem with scores ‘-‘ in jsp filenames here.
Its Eclipse 3.0 final and MyEclipse 3.8.1 GA. -
AuthorPosts