facebook

Revert Struts version back to 1.2

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

    Is there a way to change the Struts version for my project? It used to be a Struts 1.2 project, but now MyEclipse is telling me that it is a Struts 1.1 project. It told me this when I tried to add a new Struts 1.2 Action. MyEclipse complained that I can’t add a Struts 1.2 Action class to a Struts 1.1 project. My struts-config.xml specifically points to the Struts 1.2 DTD:

    <!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.2//EN” “http://struts.apache.org/dtds/struts-config_1_2.dtd”&gt;

    Is there a way I can revert my project back to a Struts 1.2 project?

    My installation details are below. Thanks for your help.

    SSS

    *** Date:
    Friday, January 12, 2007 12:29:28 PM CST

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_08

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 5.1.0 GA
    Build id: 20061111-5.1.0-GA

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 5.1.0 GA
    Build id: 20061111-5.1.0-GA

    Eclipse Graphical Editing Framework

    Version: 3.2.1.v20060921
    Build id: 20060921-1617

    Eclipse Platform

    Version: 3.2.1.r321_v20060921-b_XVA-INSQSyMtx
    Build id: M20060921-0945

    Eclipse RCP

    Version: 3.2.1.r321_v20060801-2ekW2BxmcpPUOoq
    Build id: M20060921-0945

    Eclipse Java Development Tools

    Version: 3.2.1.r321_v20060905-R4CM1Znkvre9wC-
    Build id: M20060921-0945

    Eclipse Project SDK

    Version: 3.2.1.r321_v20060801-tQ1w49KnTArT0FZ
    Build id: M20060921-0945

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -launcher
    C:\Program Files\MyEclipse Enterprise Workbench 5.1.0 GA\eclipse\eclipse.exe
    -name
    Eclipse
    -showsplash
    600
    -exitdata
    bfc_88
    -data
    C:\development\eclipse\workspace_SETracking
    -vm
    C:\Program Files\MyEclipse Enterprise Workbench 5.1.0 GA\jre\bin\javaw.exe

    #264604 Reply

    Riyad Kalla
    Member

    SSS,
    The setting it is reading from is from the .mystrutsdata file in the root of your project. If you change the “version” to “2” I believe it is, it will think it’s a 1.2 project.

    #264635 Reply

    I don’t have a .mystrutsdata file in the root of my project. I see files like .mymetadata, .myhibernatedata, etc. , but no .mystrutsdata. Any ideas?

    Thanks!

    SSS

    #264637 Reply

    Riyad Kalla
    Member

    if you right-click on the project and go to properties, then MyEclipse, and check the icons… is the Struts icon enabled?

    #264650 Reply

    Yes, the icon is enabled.

    SSS

    #264652 Reply

    Riyad Kalla
    Member

    Are you absolutely certain you can’t find a .mystrutsdata file anywhere in your project? The file contents looks like:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <MyEclipseStrutsProperties>
        <strutsVersion>2</strutsVersion>
        <basePackage>com.yourcompany.struts</basePackage>
        <strutsPattern>0</strutsPattern>
        <servletName>action</servletName>
    </MyEclipseStrutsProperties>
    

    as an example… try and search for “MyEclipseStrutsProperties” in your project. The reason I’m asking is because I don’t know how the Struts wizard could be enforcing the version constraint without this file.

    #264674 Reply

    I did the search and no results were returned. So, I created the file in the root of the project and that looks like it has fixed the problem. Thanks for your help.

    SSS

    #264683 Reply

    Riyad Kalla
    Member

    Strange I wonder what happened to the original file. Either way I’m glad it’s working now.

    #264684 Reply

    Your guess is as good as mine 🙂 . Thanks for the follow-up.

    SSS

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Revert Struts version back to 1.2

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