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()
int
int
getPage()
void
setClassName
(String className) void
void
setPadding
(int padding) void
void
withServletContext
(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
- Specified by:
execute
in interfaceAction
- Overrides:
execute
in classActionSupport
- 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:
withServletContext
in interfaceServletContextAware
-