facebook

Java with embedded Jetty – not working autocomplete for JSF

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #323275 Reply

    Jan Tichava
    Member

    We are using embedded Jetty + JSF 2 + Primefaces 3 in one of our Java project, so common JAR is a result of this build. We had migrated from Eclipse projects to Maven and there is a problem with this particular project. Build is OK, works fine, but MyEclipse doesn’t know, that this is web project, so there is no autocomplete for JSF and Primefaces components and JSF Beans.

    Is there a way, how to setup Maven project with embedded Jetty to work properly with MyEclipse including autocomplete?

    Thanks.

    #323332 Reply

    support-swapna
    Moderator

    jtichava ,

    I have escalated it to a dev team member. They will get back to you.

    #323359 Reply

    support-tony
    Keymaster

    jtichava,

    If the maven project is a web project, it should have been recognized as such, on import. However, to get content assist on faces files, you will have to add web capability and jsf capability to the project. Right click on the project, go to the MyEclipse sub-menu and select Add Web Capabilities. If you don’t want the wizard to add anything to your project, you should be able to deselect most of the options, or later remove any files or dependencies that were added. Once you have web capabilities, use the same route to add JSF capabilities; again, you can avoid the wizard adding libraries to your project.

    If this is not appropriate for your project please let us have more information about the project (such as how it was created and how it is structured, the pom might be useful). Also, please provide the MyEclipse installation details (to get these, go to MyEclipse->Installation Summary->Installation Details).

    Please let us know how this works for you.

    #323366 Reply

    Jan Tichava
    Member

    Tony,

    Thanks for quick answer.
    It’s not web project. It’s Java project, because we’re using embedded Jetty, so, we build JAR archive and launch it as “common” Java application (with some class with main(…)).

    I figured out it before my first post: import Maven project, then add Web Project Capabilities, then JSF Capabilities and then revert changes from git and everything works fine, but I was hoping that there is a “clever” way how to do this. So, yes, your instructions work too.

    Attachments:
    You must be logged in to view attached files.
    #323397 Reply

    support-tony
    Keymaster

    jtichava,

    Thanks for getting back to us, and for the installation details. There is another way to do it. Right click on the project and select Properties. Go to “Project Facets”. If you see a link about converting to a faceted project, click it. Then you can add the facets “Dynamic Web Module” and “JavaServer Faces”. The latter has further configuration when first selected (a link at the bottom) but I don’t think you need that. Now click Apply or OK and you should be all set.

    I hadn’t thought about this possibility before but it appears to work.

    #323518 Reply

    Jan Tichava
    Member

    Tony,

    ok, thanks for help.

    #323558 Reply

    support-tony
    Keymaster

    jtichava,

    No problem, I’m glad to be of service.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Java with embedded Jetty – not working autocomplete for JSF

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