Dear Lukasz,

I am creating a very simple Struts2 application using Tomcat Server 9 and
Java 17 but I am getting the following error.

http://localhost:8080/Struts2Starter/getTutorial.action

HTTP Status 404 – Not Found
------------------------------

*Type* Status Report

*Message* There is no Action mapped for namespace [/] and action name
[getTutorial] associated with context path [/Struts2Starter].

*Description* The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.
------------------------------
Apache Tomcat/9.0.82
This is my project structure. I am basically following this youtube
tutorial https://www.youtube.com/watch?v=pqNt8QK16JM

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="
http://xmlns.jcp.org/xml/ns/javaee"; xsi:schemaLocation="
http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"; id="WebApp_ID" version=
"3.1">

<display-name>Struts2Starter</display-name>

<filter>

<filter-name>struts2</filter-name>

<filter-class>
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</
filter-class>

</filter>




<filter-mapping>

<filter-name>struts2</filter-name>

<url-pattern>/*</url-pattern>

</filter-mapping>

</web-app>


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"

"http://struts.apache.org/dtds/struts-2.0.dtd";>

<struts>

<package name="default" namespace="/" extends="struts-default">

<action name="getTutorial" class="org.mahabir.action.TutorialAction">

<result name="success">/success.jsp</result>

<result name="failure">/error.jsp</result>

<!-- <result name="noSession">/login.jsp</result>-->

</action>

</package>


</struts>

package org.mahabir.action;


public class TutorialAction {

// create the execute method

public String execute(){

System.out.println("Hello from execute method");

return "success";

}


}

<%@ page language="java" contentType="text/html; charset=UTF-8"

pageEncoding="UTF-8"%>

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Insert title here</title>

</head>

<body>

Success page

</body>

</html>

/Struts2Starter/src/main/java/org/mahabir/action/TutorialAction.java
/Struts2Starter/src/main/resources/struts.xml

/Struts2Starter/web/success.jsp

There is no message displayed on the Tomcat console. I really have no idea
what is the issue. Any assistance would be appreciated.
Thank you.

Regards'
Mahabir


On Tue, Jan 14, 2025 at 2:55 PM Lukasz Lenart <lukaszlen...@apache.org>
wrote:

> I don't recall changes in this area, only this one but it was in Struts 2.3
> https://issues.apache.org/jira/browse/WW-4073
>
> niedz., 12 sty 2025 o 04:22 Murali Challa <challamura...@gmail.com>
> napisał(a):
> >
> > Hi,
> >
> > We are migrating our application from struts2-core 2.5.33 to 6.7.0.
> >
> > Post migration, we are facing issues while populating bean values in
> > session.
> >
> > ${} is printing null values. Seems the EL is not working post 6.x
> migration.
> >
> > Can you help me to understand if I'm missing something in this migration.
> >
> > Below is the code snippet for your reference.
> >
> > <s:iterator value="session.list" var="menu" status="s">
> >   <s:property value="id" /> // working
> >
> >    ${menu.id} // Not working
> > <s:iterator>
> >
> > Thanks,
> > Murali
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to