org.apache.struts.action.ActionServlet Java Examples

The following examples show how to use org.apache.struts.action.ActionServlet. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BaseAction.java    From jpetstore-kubernetes with Apache License 2.0 5 votes vote down vote up
public void setServlet(ActionServlet actionServlet) {
	super.setServlet(actionServlet);
	if (actionServlet != null) {
		ServletContext servletContext = actionServlet.getServletContext();
		WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
		this.petStore = (PetStoreFacade) wac.getBean("petStore");
	}
}
 
Example #2
Source File: BaseAction.java    From cacheonix-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
public void setServlet(ActionServlet actionServlet) {
	super.setServlet(actionServlet);
	if (actionServlet != null) {
		ServletContext servletContext = actionServlet.getServletContext();
		WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
		this.petStore = (PetStoreFacade) wac.getBean("petStore");
	}
}
 
Example #3
Source File: RetrievePersonalPhotoAction.java    From fenixedu-academic with GNU Lesser General Public License v3.0 5 votes vote down vote up
public static void writeUnavailablePhoto(HttpServletResponse response, ActionServlet actionServlet) {
    response.setContentType("image/png");
    try (InputStream mm =
            RetrievePersonalPhotoAction.class.getClassLoader().getResourceAsStream("META-INF/resources/img/mysteryman.png")) {
        response.getOutputStream().write(Avatar.process(mm, "image/png", 100));
    } catch (IOException e) {
        logger.error(e.getMessage(), e);
    }
}
 
Example #4
Source File: PojoPlugin.java    From rice with Educational Community License v2.0 4 votes vote down vote up
public void init(ActionServlet servlet, ModuleConfig config) throws ServletException {
    initBeanUtils();
    // override the Struts ControllerConfig with our own wrapper that knows how to
    // dynamically find max file upload size according to Rice run-time settings
    config.setControllerConfig(new KualiControllerConfig(config.getControllerConfig()));
}
 
Example #5
Source File: ExtendedMultiPartRequestHandler.java    From jivejdon with Apache License 2.0 2 votes vote down vote up
/**
 * Retrieves the servlet with which this handler is associated.
 * 
 * @return The associated servlet.
 */
public ActionServlet getServlet() {
	return this.servlet;
}
 
Example #6
Source File: ExtendedMultiPartRequestHandler.java    From jivejdon with Apache License 2.0 2 votes vote down vote up
/**
 * Sets the servlet with which this handler is associated.
 * 
 * @param servlet
 *            The associated servlet.
 */
public void setServlet(ActionServlet servlet) {
	this.servlet = servlet;
}