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
Processes configuration, page, and action class paths to create snippets
of the files for display.
- See Also:
-
Field Summary
Fields inherited from class org.apache.struts2.ActionSupport
container -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()A default implementation that does nothing an returns "success".intintgetPage()voidsetClassName(String className) voidvoidsetPadding(int padding) voidvoidwithServletContext(jakarta.servlet.ServletContext arg0) Methods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getLocaleProvider, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate
-
Constructor Details
-
ViewSourceAction
public ViewSourceAction()
-
-
Method Details
-
execute
Description copied from class:ActionSupportA default implementation that does nothing an returns "success".Subclasses should override this method to provide their business logic.
See also
Action.execute().- Specified by:
executein interfaceAction- Overrides:
executein classActionSupport- Returns:
- returns
Action.SUCCESS - Throws:
IOException
-
setClassName
- Parameters:
className- the className to set
-
setConfig
- Parameters:
config- the config to set
-
setPage
- Parameters:
page- the page to set
-
setPadding
public void setPadding(int padding) - Parameters:
padding- the padding to set
-
getClassLines
- Returns:
- the classLines
-
getConfigLines
- Returns:
- the configLines
-
getPageLines
- Returns:
- the pageLines
-
getClassName
- Returns:
- the className
-
getConfig
- Returns:
- the config
-
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:
withServletContextin interfaceServletContextAware
-