Struts in eclipse

Hi Folks,
Whenever i start creating a dynamic web application, I ended up with the following error
type Status report
message /StrutsHelloWorld
description The requested resource (/StrutsHelloWorld) is not available.

Could you please help me where i'm making mistake. Well Thanks in advance

NOTE: I'm using Eclipse INDIGO f

Replies

  • Anoop Kumar
    Anoop Kumar
    Paste your directory structure and struts.xml here.
    Looks like action path given in struts.xml not correct. if possible upload you project.
  • Nikumbh
    Nikumbh
    @ianoopI don't know how to upload the directory
  • Nikumbh
    Nikumbh
    
     
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
       
       
        <%@ taglib prefix="s" uri="/struts-tags"%>
    
    
    
    
    Insert title here
    
    
    

    Hello World From Struts2



    
    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
        <%@ taglib prefix="s" uri="/struts-tags" %>
    
    
    
    
    Insert title here
    
    
    Hello World, 
    
    
  • Nikumbh
    Nikumbh
    //HelloWorldAction.java
     
    package com.tutorialspoint.struts2;
     
    public class HelloWorldAction {
        private String name;
     
          public String execute() throws Exception {
              return "success";
          }
         
          public String getName() {
              return name;
          }
     
          public void setName(String name) {
              this.name = name;
          }
     
    }
    
    // web.xml
     
    
    
      display-name>Struts 2
      
          index.jsp
      
      
          struts2
          
            org.apache.struts2.dispatcher.FilterDispatcher
          
      
     
      
          struts2
          /*
      
    
    //struts.xml
     
     
    
    
    
    
      
       
          
                /HelloWorld.jsp
          
      
    
  • Nikumbh
    Nikumbh
    #-Link-Snipped-# Am I able to clear you?
  • Anoop Kumar
    Anoop Kumar
    structure seems fine but problem with struts that what is working in Struts 2.X.2 may not work in struts 2.x.11. I have faced similar issue.
    Can you try this tutorial they have mentioned particular struts library also?
    #-Link-Snipped-#
    If not I have working project, I will upload from home.
  • Nikumbh
    Nikumbh
    Could you please upload the code you're having at home, if it doesn't follow the maven plugin. Well #-Link-Snipped-# Thanks mate...๐Ÿ˜€
  • Anoop Kumar
    Anoop Kumar
    Find attachment and add following to your lib path from struts 2.3 libraries
      struts2-core.jar
          freemarker.jar
          xwork-core.jar
          ognl.jar
          commons-fileupload.jar
          commons-lang.jar
          commons-io.jar
    This should work. I have tested it.
  • Anand Tamariya
    Anand Tamariya
    Where have you done the mapping for StrutsHelloWorld ?
  • Nikumbh
    Nikumbh
    ianoop
    Find attachment and add following to your lib path from struts 2.3 libraries
      struts2-core.jar
          freemarker.jar
          xwork-core.jar
          ognl.jar
          commons-fileupload.jar
          commons-lang.jar
          commons-io.jar
    This should work. I have tested it.
    Thank You very much mate. ๐Ÿ˜€
  • Nikumbh
    Nikumbh
    Anand Tamariya
    Where have you done the mapping for StrutsHelloWorld ?
    #-Link-Snipped-# : Thank you very much for your reponse.... But i've found the solution by the #-Link-Snipped-# 's reponse. Anyways thank you very much buddy.
  • Nikumbh
    Nikumbh
    ianoop
    Find attachment and add following to your lib path from struts 2.3 libraries
      struts2-core.jar
          freemarker.jar
          xwork-core.jar
          ognl.jar
          commons-fileupload.jar
          commons-lang.jar
          commons-io.jar
    This should work. I have tested it.
    #-Link-Snipped-# FYI:
    Previously i didn't have the
    freemarker.jar, xwork-core.jar in my libraries list. But it works
    perfect now... Thanks again dude...
    ๐Ÿ‘

You are reading an archived discussion.

Related Posts

(Found here:https://cr4.globalspec.com/blogentry/22716/The-Tangent-Side-Engineer-s-Encouragement?frmtrk=cr4digest)
If you are a music lover, the kind who not mind paying Rs. 5000+ for a pair of headphones, then the big name in the audio gear, Sennheiser and the...
India tried to take step against Piracy. They even blocked all torrent websites. Due to some reasons (or maybe due to Anonymous attacking 'em) they unblocked all the torrents. Atleast...
hi CEans !!! how r u all !? After a long time Once again am posting a thread !! hope everybody is fine ๐Ÿ˜€ First of all let me inform...
I have searched internet for long, hoping to get some insight about designation of "charted engineer". What is a charted engineer? I have BE degree, am I eligible for registering...