You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Thomas Ramapuram <th...@gmail.com> on 2007/08/21 15:31:22 UTC

Problems with Sitegraph

Hi.
I have been trying to use Sitegraph for quite sometime now with no 
luck.  I there any application with demonstrates its use.
I tried the Action given below.  It generates an image but only the 
JSP's and the Actions there are no links between them..
The other problem I had was that Sitegraph did not work with spring plugin.
Any kind of pointers would be a great help.  Currently there's not much 
documentation on Sitegraph.
Regards,
Thomas





package tutorial;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.sitegraph.SiteGraph;

import com.opensymphony.xwork2.ActionSupport;

public class TestSiteGraph extends ActionSupport implements 
ServletRequestAware {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private HttpServletRequest request;


    public String execute() throws Exception {
        ServletContext sc = request.getSession().getServletContext();
        SiteGraph siteGraph = new 
SiteGraph(sc.getRealPath("/WEB-INF/classes"), sc.getRealPath("/"),  
sc.getRealPath("/img/"), "");
        siteGraph.prepare();
        siteGraph.render();
        return SUCCESS;
    }

    public void setServletRequest(HttpServletRequest arg0) {
        request = arg0;
    }
}


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org