Questions tagged [struts2-namespace]

Struts2 Namespace is a concept to subdivide packages on multiple modules by given a namespace to each module. In addition, it can be used to avoid conflicts between same action names located at different modules. Each module can have its own actions with the same name, each with its own implementation.

Struts2 Namespace is a concept to subdivide packages on multiple modules by given a namespace to each module. In addition, it can be used to avoid conflicts between same action names located at different modules. Each module can have its own actions with the same name, each with its own implementation. While the prefix appears in the browser URI, the tags are used namespace attribute to define a namespace prefix to be used in forms and links, and URIs are built using it.

Detailed explanation to the namespace configuration you can find at Struts 2 documentation page: Namespace Configuration.

36 questions
11
votes
7 answers

Struts Hello world example : There is no Action mapped for namespace [/] and action name error

i am absolute beginner to Struts2. I am tying to follow tutorials on struts web site. i followed this tutorial. i have some trouble with it. i created dynamic web project on eclipse. Then i followed the tutorial. However when i run the example i get…
erencan
  • 3,725
  • 5
  • 32
  • 50
7
votes
8 answers

There is no Action mapped for namespace [/] and action name [] associated with context path

I've looked through all similar Q's on stackoverflow but it didn't help, sorry. The main difference I have from all of them is that I got EMPTY action name in error message. Googling didn't help :( Hope someone just could give a hint where to look…
pinkesh
  • 81
  • 1
  • 1
  • 3
5
votes
1 answer

Using multiple Struts2 namespaces with tiles

I want to add namespaces in my struts2 configuration and I use tiles. A package of my struts.xml for example :
Rydermark
  • 217
  • 1
  • 4
  • 13
4
votes
1 answer

How to prevent the wildcard namespace in struts?

I am facing a problem that I couldn't find a key word for googleing the following situation:
Steve Lam
  • 499
  • 1
  • 10
  • 27
3
votes
1 answer

Multi action in struts form

I want to add 3 button into struts form. My code is : @Action("/admin/product/insert") public String insert() throws Exception { if(upload.hasFile()){ model.setImage(upload.getFileFileName()); …
2
votes
3 answers

struts2 ignore particular pattern

I am using strust2 for my web application development. My struts.xml file will be like:
user915303
2
votes
1 answer

Struts2 URL unreachable

I'm really racking my head here with Struts2 - I'm able to access the JSP pages by omitting part of the path. Note the path suppose to include pages/welcome_user.jsp. The key is to look at the word pages in the path. here's the struts.xml…
2
votes
6 answers

HTTP Status 404 - There is no Action mapped for namespace [/] and action name [login] associated with context path [/struts2]

I have learned theory of Struts2 and now practicing. Facing problems while executing project.I searched in Google in many ways but could not find result.Please help me. Below is the code.Please help me friends... Project structure: web.xml
user2940073
  • 79
  • 1
  • 1
  • 5
2
votes
4 answers

There is no Action mapped for namespace / and action name hello

package com.tutorialspoint.struts2; public class HelloWorldAction{ private String name; public String execute() throws Exception { return "success"; } public String getName() { return name; } public void…
user2794306
  • 175
  • 3
  • 5
  • 24
2
votes
1 answer

Behavior of Struts2 and convention-plugin when there is Index(extends ActionSupport)

We have an Action class named 'Index' immediately under com.example.common.action and is annotated @ParentPackage('default') which is declared in package directive in struts.xml and has "/" for its namespace and extends "struts-default". It also…
hanishi
  • 165
  • 2
  • 11
1
vote
1 answer

getting error "There is no Action mapped for namespace / and action name LoginAction" in struts2

My struts.xml is under 'src' and action class is in a package 'login'. Here's my struts.xml:
rahul
  • 11
  • 1
  • 3
1
vote
2 answers

Struts2 same namespaces in different struts.xml files

Is it possible to use same namespace in different struts.xml files?. I know that we can use different namespaces. The problem is, i have so many actions in my configuration file. I just want to split up inorder to manage easily. But if i use…
dbyuvaraj
  • 487
  • 1
  • 6
  • 20
1
vote
2 answers

Action in Struts2 Application

I had a sample HelloWorld Example of Struts 2 from web. Its struts.xml contains: /success.jsp
Ankit
  • 2,126
  • 4
  • 33
  • 53
1
vote
1 answer

Namespace configuration when set a specific context-root in Struts 2

When I set a context-root in weblogic.xml for my application, what is the default namespace for package in Struts 2? ex: I set /home/app/exec and I access my app with the following…
Ariana
  • 283
  • 1
  • 6
  • 17
1
vote
1 answer

Changing from one namespace to another when clicking a submit button in Struts 2

I'm new to Struts 2 framework, I have a problem changing from one namespace to another when clicking a submit button, I get this error. struts.xml file
1
2 3