facebook

[Closed] Projects on Build Path Ignored

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #250115 Reply

    Hi:
    I have several dependent projects:
    Common<-Component1 (depends)<-WebApp (depends)
    The build path for WebApp has both Common project and Component1 selected. While this works for the Java classes in Component1 it does not appear to work for the WebApp. Adding the script:
    <%@ page language=”java” import=”ll.isd.ics.project.component1.Component1″%>
    <%Component1 component1=new Component1();%>
    results in an error.

    So the question: how can I develop a web application with classes from another project. Putting projects on the build path works for Java projects but so far I haven’t been able to get it to work for web projects.

    Thanks,

    Bob N-

    #250121 Reply

    Riyad Kalla
    Member

    This is actually supported. Besides adding Component1 as a Project on the build path in the WebApp, also mark it as a project reference for WEbApp as well. Try rebuilding the webapp if necessary.

    Do you see autocomplete for that class from the Component1 project when you try and use it in a scriptlet?

    <%= new ll.isd.ics.project.component1.|<– Invoke autocomplete %>

    #250122 Reply

    Hi:
    I have rebuilt all of the projects and do not find any auto-completion in the web application. The code is simple:
    <%@ page import=”ll.isd.ics.project.component1.*”%>
    <%Component1 component1=new ll.isd.ics.project.component1.Component1();%>
    <html>
    <head>
    </head>
    <body>
    <p>Output is <% =component1.testComponent()%></p>
    </body>
    </html>
    The import parameter (ll.isd…) is underlined in red indicating an error.
    The instatiation <%Component1 component1=… shows no error but it does not support auto-completion. Finally, invocation of the method on the instatiated object shows an error underlining of the “=” and the “)”.

    Regards,

    Bob N-[/img]

    #250123 Reply

    Riyad Kalla
    Member

    Bob,
    Is my understanding of your setup correct in that in your initial post even though you mentioned the “Common” project, the issue is actually between Web Project and Component1 correct?

    Also, under your WebProject project properties, if you open the MyEclipse-Web properties, what two settings do you have there for the web roots? Additionally, are you certain that the Component1 project is a simple Java Project?

    If all of this is “yes” and “True”, I will need more information from you about the layout of the projects and your build path settings and so forth. Of course if the projects are not too large you can export all 3 into a single ZIP and send them to me to look at if you like. I’m sure this is some simple configuration sisue, but without sitting there looking at the project, it’s hard to trouble shoot from here.

    #250125 Reply

    Hi:
    I have zipped up the whole project. It is a simplified version of the real project structure that I am using to track down the problems. It is the first attempt at restructuring an overall project into subprojects wioth one common project, a set of java projects that inherit from common and a web app that uses all of the above.

    The zip file is 3.5 MB. How do I send it ??

    Regards,

    Bob N-

    #250127 Reply

    Riyad Kalla
    Member

    support@genuitec.com ATTN Riyad, please include a link to this thread so I know why I’m getting the file.

    #250142 Reply

    Hi:
    I have now reduced the example to its minimum ~15 lines of code qith two projects. The result looks to be more promising. It will take a little time to build back to the slightly more complicated structure and to see where the error (if any) comes in. Talk to you later.

    Regards,

    Bob N-

    #250166 Reply

    Riyad Kalla
    Member

    Ok Bob, keep me posted.

    #250246 Reply

    Well, it seems that the simplest case works well. I will now add the more complicated cases but I believe that all should work. Why it didn’t in the beginning I can’t say but once I had reduced it to the simplest case (as you suggested) of one dependent project then it came alive. I still need a structure of a common set of calsse that “feed” other Java projects that ulimately become actions, forms and POJO’s.

    So that is the end of the thread: it really works in the simple case and I’ll make it work in the more structured cases.

    Thanks for the help.

    Regards,

    Bob N-

    #250249 Reply

    Riyad Kalla
    Member

    Thank you for following up Bob.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: [Closed] Projects on Build Path Ignored

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