facebook

JSP Page Code Completion Problem

  1. MyEclipse Archived
  2.  > 
  3. Old Posts
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #196514 Reply

    gcstang
    Member

    Java 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.

    #196523 Reply

    Scott Anderson
    Participant

    Do 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

    #196534 Reply

    gcstang
    Member

    I 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.

    #196537 Reply

    Scott Anderson
    Participant

    Could 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

    #196553 Reply

    gcstang
    Member

    Nope 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.

    #196558 Reply

    Scott Anderson
    Participant

    Can 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

    #196560 Reply

    gcstang
    Member

    The 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.

    #196564 Reply

    Scott Anderson
    Participant

    Since 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

    #196566 Reply

    gcstang
    Member

    Nope 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 ****************************

    #196570 Reply

    Scott Anderson
    Participant

    looks 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

    #196571 Reply

    gcstang
    Member

    Thank 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

    #196573 Reply

    Scott Anderson
    Participant

    Gil,

    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

    #214229 Reply

    bartelme
    Member

    I just wanted to add it seems filenames with spaces have this same problem. Using Eclipse 3.0 and MyEclipse 3.8.1 GA

    #215084 Reply

    Thomas Weber
    Member

    Similiar problem with scores ‘-‘ in jsp filenames here.
    Its Eclipse 3.0 final and MyEclipse 3.8.1 GA.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: JSP Page Code Completion Problem

You must be logged in to post in the forum log in