facebook

MyEclipse 3.8.0 beta-2 and Struts 1.0 support

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #211838 Reply

    elmarit
    Member

    I have installed MyEclipse 3.8.0 beta-2 on top of Eclipse 3.0 . I am just learning Struts and decided this is the best way to do it 🙂 I followed the Flash Struts Project Tutorial you provide (BTW, it’s kind of obsolete, the screens don’t match too much), but unfortunately the app I am going to maintain (and possibly enhance) in our company is based on Struts 1.0 (not even 1.0.3) and due to a very proprietary J2EE engine I am not allowed to upgrade Struts in it to 1.1.

    As I was Enabling project for Struts and chose the Struts 1.0 radio, I was told the libraries were missing (there was no problem with Struts 1.1 support).

    Could you please advise which Struts 1.0 files to place where?

    Many thanks for your help.

    #211865 Reply

    Riyad Kalla
    Member

    elmarit,
    We don’t ship the Struts 1.0 libraries with ME, just the Struts 1.1 libraries. Please download the Struts 1.0 package separate and then navigate to the Window > Preferneces > MyEclipse > J2EE > Struts page and click on the “Struts 1.0” tab and then setup the libraries and resources that are used for Struts 1.0

    Now when you add Struts Capabilities and select 1.0, these libraries/resources will be used.

    #211886 Reply

    elmarit
    Member

    Thanks, it helped me proceed. Now I have two projects created by copying the Flash Tutorial procedure, one with Struts 1.1 and the other one with Struts 1.02.

    The difference is that the generated JSP doesn’t report any errors in the former project, but in the latter the error in second non-blank line says “could not load TLD for uri=http://jakarta.apache.org/struts/tags-bean”

    Strange thing is, that the files have these lines totally identical…

    Do I still miss something in the Struts 1.0 setup?

    Thanks.

    #211887 Reply

    Riyad Kalla
    Member

    It is likely that the default URI that the Struts taglibs use for the Struts 1.0 release are different. You can open the Struts.jar file and look in the META-INF/tlds dir, if that dir does not exist, then you need to put the TLD files in your WEB-INF dir, and then add <taglib> entries in your web.xml file to point to them. If you do end up doing that, make sure to use the same URIs you are already using for the taglibs, so you don’t need to change your JSP page.

    The reason for this kind of confusion is that an app server is allowed to automatically resolve the location and URI of a taglib IF it is included in a JAR file in the classpath, which Struts 1.1 does… if Struts 1.0 doesn’t do this, then you need to ‘manually’ setup the taglib references via the web.xml file.

    #212090 Reply

    elmarit
    Member

    Well, the /tlds directory is in the Struts.jar containing struts-bean.tld, struts-html.tld, struts-form.tld, struts-logic.tld and struts-template.tld files (I can also see them under WEB-INF of the test102 project in the Navigation pane). Seems mysterious.

    Please could you try replicate this quick few steps of setting up a new Struts 1.0.2 project (following your flash tutorial) and see if you have this red X spot next to the second line of the generated jsp page:
    <%@ taglib uri=”http://jakarta.apache.org/struts/tags-bean&#8221; prefix=”bean”%>
    with the “could not load TLD for uri=http://jakarta.apache.org/struts/tags-bean” message on it?

    Thank you.

    #212115 Reply

    Riyad Kalla
    Member

    Definately, can you provide the link for Struts 1.0.2 that you used so I have *exactly* the same setup?

    #212195 Reply

    elmarit
    Member
    #212238 Reply

    Riyad Kalla
    Member

    elmarit,
    I downloaded it and tried it and something I saw right off the bad is the default URI I was talking about, its different for this release, it includes the version number after the URI… for example for the beans taglibs, its this: “<%@ taglib uri=”http://jakarta.apache.org/struts/tags-bean-1.0.2&#8243; prefix=”bean”%>”

    Please try and change that in your setup and see if evcerything starts working all the sudden. Also it probably wouldn’t hurt to upgrade to 3.8 GA (its an awesome upgrade).

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: MyEclipse 3.8.0 beta-2 and Struts 1.0 support

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