Class ViewSourceAction

java.lang.Object
org.apache.struts2.ActionSupport
org.apache.struts2.showcase.source.ViewSourceAction
All Implemented Interfaces:
Serializable, Action, ServletContextAware, ValidationAware, LocaleProvider, TextProvider, Validateable

public class ViewSourceAction extends ActionSupport implements ServletContextAware
Processes configuration, page, and action class paths to create snippets of the files for display.
See Also:
  • Constructor Details

    • ViewSourceAction

      public ViewSourceAction()
  • Method Details

    • execute

      public String execute() throws IOException
      Specified by:
      execute in interface Action
      Overrides:
      execute in class ActionSupport
      Throws:
      IOException
    • setClassName

      public void setClassName(String className)
      Parameters:
      className - the className to set
    • setConfig

      public void setConfig(String config)
      Parameters:
      config - the config to set
    • setPage

      public void setPage(String page)
      Parameters:
      page - the page to set
    • setPadding

      public void setPadding(int padding)
      Parameters:
      padding - the padding to set
    • getClassLines

      public List<String> getClassLines()
      Returns:
      the classLines
    • getConfigLines

      public List<String> getConfigLines()
      Returns:
      the configLines
    • getPageLines

      public List<String> getPageLines()
      Returns:
      the pageLines
    • getClassName

      public String getClassName()
      Returns:
      the className
    • getConfig

      public String getConfig()
      Returns:
      the config
    • getPage

      public String getPage()
      Returns:
      the page
    • getConfigLine

      public int getConfigLine()
      Returns:
      the configLine
    • getPadding

      public int getPadding()
      Returns:
      the padding
    • withServletContext

      public void withServletContext(jakarta.servlet.ServletContext arg0)
      Specified by:
      withServletContext in interface ServletContextAware