struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milos Negovanovic <>
Subject configuring json action
Date Mon, 14 Dec 2009 21:31:02 GMT

I am trying to get JSON response from struts2 action.

My struts.xml contains the fallowing:

  <package name="example" extends="json-default">
    <action name="testjson" class="tutorial.example.JSONAction">
      <result type="json" />

Class is empty at the moment:

package tutorial.example;

import com.opensymphony.xwork2.ActionSupport;

public class JSONAction extends ActionSupport {
    public String execute() throws Exception {
        return SUCCESS;

When I try to access JSON action under
http://localhost:8080/tutorial/testjson URL I get the fallowing error

Struts Problem Report

Struts has detected an unhandled exception:
# Messages: 	There is no Action mapped for namespace / and action name testjson.

Any suggestions on how to make JSON action work?

Milos Negovanovic

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message