facebook

cannot get struts to work

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #202585 Reply

    Keith Lockey
    Member

    Cannot get the struts to work properly.
    Thanks,
    Keith

    – System Setup ——————————-
    Operating System and version: RedHat linux 9.0
    Eclipse version: 2.1.2
    Eclipse build id: 200311030802
    Fresh Eclipse install (y/n): y
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins:
    Number of plugins in the <eclipse>/plugins directory:
    MyEclipse version: 2.07
    Eclipse JDK version: 4.1
    Application Server JDK version: tomcat 4.0
    Are there any exceptions in the Eclipse log file?
    no

    – Message Body ——————————-
    undefined

    #202593 Reply

    Riyad Kalla
    Member

    Keith a few questions… when you say “MyEclipse version: 2.07” do you mean 2.7RC2? (version from About page, plugin information is 2.6.200). Also the JDK version you are using is important, what does ‘java -version’ in the console spit out?

    Also the typical way to get struts working with a new or existing project:
    1) Create new Web Module Project
    2) Right click on node, “Add Struts Capabilities”
    3) Open the struts-config and see if you get the custom struts editor and nice outline view.

    We will need to know how you are trying to use MyEclipse to get struts support. For example, I don’t know if you have tried these steps and are having a problem or if you are just trying to open a struts-config file dry and haven’t added Struts Capabilities to your project yet. These types of details help us troubleshoot your problem.

    #202656 Reply

    Keith Lockey
    Member

    Hi,

    Thanks for the reply. It is 2.7RC2.
    I am getting a 404 error .

    inHTTP Status 404 – /kllogger

    I have my struts config in the WebRoot folder named kllogger. here is the stuts config file

    
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
        <data-sources />
        <form-beans>
            <form-bean name="RunTodayForm" type="com.keith_lockey.logger.form.RunTodayForm"/>
        </form-beans>
        
        <global-exceptions />
        <global-forwards />
        
        <action-mappings>
        <action    path      = "/today"
                   type      = "com.keith_lockey.logger.action.RunTodayAction"
                   name      = "RunTodayForm"
                   scope     = "request"
                   validate  = "true"
         > 
            <forward name="Success" path="/RunningLog.jsp"/>    
        </action>
        </action-mappings>
        <controller />
    </struts-config>
    
    
    
    
    
    #202658 Reply

    Riyad Kalla
    Member

    Are you running Tomcat from MyEclipse? Did you set it up correctly in Window->Preferences->MyEclipse->Application Servers->Tomcat 4? Did you make sure to setup Eclipse to use a JDK instead of a JRE? Did you setup a deployment for your project to the Tomcat 4 application server?

    #202660 Reply

    Keith Lockey
    Member

    i am able to get struts working when i import the jars and put tld in the web-inf. but i added struts capabilities to this new project and try to get it work, and it wont. must be config or web.xml i would think

    Thanks,
    Keith

    #202661 Reply

    support-michael
    Keymaster

    Let’s see if we can isolate the problem.

    1) First verify that when you start Tomcat from MyEclipse you can access it correctly. Launch Tomcat from MyEclipse and see if you can access any of the following URLs (assumes examples loaded with TC install and TC is listening on port 8080):

    http://localhost:8080/jsp-examples/index.html
    http://localhost:8080/tomcat-docs/index.html

    2) The name of your project will be the web-context. So I assume your project has the following structure:

          klogger/
             <yourwebroot>/
                 <webcontent>
                  WEB-INF/
                       classes/
                       lib/

    3) When you get a 404 error try:

    a) Inspect the deployed web-app in <tomcat>/webapps/klogger and verify that it exists and is not missing any elements

    b) Add a helloworld.html file to the <webroot> folder and invoke from browser. If you can’t see it then your problem is more fundamental than Struts

    4) When “Adding Struts Capabilities…” the wizard will add Struts libs and TLDs to your project, update your web.xml, and create the struts-config.xml file. I’m not sure why you are able to perform this process manually but then not through the “Add Struts Cap…” wizard. How are you deploying, exploded format or archived?

    Let us know how this turns out and we then we can delve deeper.

    #202890 Reply

    I am also working with struts but I have this problem:

    HTTP ERROR: 500 Exception creating bean of class com.sih.action.LoginActionForm: java.lang.ClassNotFoundException: com.sih.action.LoginActionForm
    RequestURI=/SIHWeb/index.jsp

    I am using jboss3.2.1

    This is my struts-config.xml:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE struts-config PUBLIC “-//Apache Software Foundation//DTD Struts Configuration 1.0//EN” “http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd”&gt;
    <struts-config>
    <form-beans>
    <form-bean name=”loginForm” type=”com.sih.action.LoginActionForm”/>
    </form-beans>

    <action-mappings>
    <action path=”/setupSIH” forward=”/inicioSIH.jsp”/>

    <action path=”/login”
    type=”com.sih.action.loginAction”
    name=”loginForm”
    scope=”request”
    validate=”false” >
    <forward
    name=”success”
    path=”/inicioSIH.jsp”/>
    <forward
    name=”falied”
    path=”/falloSIH.jsp”/>
    </action>

    <!– <message-resources parameter=”com.sih.struts.ApplicationResources” /> –>
    </action-mappings>

    </struts-config>

    Thanks,

    Jenny

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: cannot get struts to work

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