मैं Struts2 के लिए पूर्ण शुरुआतकर्ता हूं। मैं स्ट्रैट्स वेब साइट पर ट्यूटोरियल्स का पालन करने के लिए तैयार हूं। मैंने this tutorial का पालन किया। मुझे इसके साथ कुछ परेशानी है। मैंने ग्रहण पर गतिशील वेब प्रोजेक्ट बनाया है। फिर मैंने ट्यूटोरियल का पालन किया। हालांकि जब मैं उदाहरण चलाता हूं तो मुझे निम्न त्रुटि मिलती है।स्ट्रेट्स हैलो वर्ल्ड उदाहरण: नेमस्पेस के लिए मैप किए गए कोई एक्शन नहीं है [/] और एक्शन नेम एरर
There is no Action mapped for namespace [/] and action name [hello] associated with context path [/Hello_World_Struts_2]. - [unknown location]
मैं निम्नलिखित निर्देशिका संरचना है
और मेरे struts.xml फ़ाइल आपकी प्रतिक्रियाओं के लिए
<?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>
<constant name="struts.devMode" value="true" />
<package name="basicstruts2" extends="struts-default" namespace="/">
<action name="index">
<result>/index.jsp</result>
</action>
<action name="hello" class="org.apache.struts.helloworld.action.HelloWorldAction" method="execute">
<result name="SUCCESS">/HelloWorld.jsp</result>
</action>
</package>
</struts>
धन्यवाद है।
मैं कोड ब्लॉक के अंदर यह डालने की कोशिश की, लेकिन मैं यह नहीं कर सके। अब, ठीक है, मुझे लगता है। – erencan