Skip to content

Commit

Permalink
WN-5141
Browse files Browse the repository at this point in the history
- TODO:  TEMPARARY comment-out velocity-tools code
  • Loading branch information
jdyer1 committed Oct 30, 2023
1 parent 8d3880a commit d5e766e
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package org.apache.struts2.sitemesh;


import com.opensymphony.module.sitemesh.*;
import com.opensymphony.module.sitemesh.util.OutputConverter;
//import com.opensymphony.module.sitemesh.*;
//import com.opensymphony.module.sitemesh.util.OutputConverter;
import com.opensymphony.xwork2.ActionContext;

import org.apache.logging.log4j.LogManager;
Expand Down Expand Up @@ -51,15 +51,15 @@
* Velocity Manager in Struts instead of creating it's
* own manager</p>
*/
public class VelocityDecoratorServlet extends VelocityViewServlet {
public class VelocityDecoratorServlet { /*extends VelocityViewServlet {
private static final Logger LOG = LogManager.getLogger(VelocityDecoratorServlet.class);
private static final long serialVersionUID = -6731485159371716918L;
protected VelocityManager velocityManager;
protected String defaultContentType;

*/
/**
* <p>Initializes servlet, toolbox and Velocity template engine.
* Called by the servlet container on loading.</p>
Expand All @@ -71,7 +71,7 @@ public class VelocityDecoratorServlet extends VelocityViewServlet {
* servlet.</p>
*
* @param config servlet configuration
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
Dispatcher dispatcher = Dispatcher.getInstance(getServletContext());
Expand Down Expand Up @@ -151,22 +151,22 @@ public Template handleRequest(HttpServletRequest request, HttpServletResponse re
private DecoratorMapper getDecoratorMapper() {
Factory factory = Factory.getInstance(new Config(getServletConfig()));
return factory.getDecoratorMapper();
}
}*/

/**
* <p>Creates and returns an initialized Velocity context.</p>
*
* @param request servlet request from client
* @param response servlet reponse to client
*/
protected Context createContext(HttpServletRequest request, HttpServletResponse response) {
Context context = (Context) request.getAttribute(VelocityManager.KEY_VELOCITY_STRUTS_CONTEXT);
if (context == null) {
ActionContext ctx = ServletActionContext.getActionContext(request);
context = velocityManager.createContext(ctx.getValueStack(), request, response);
}
return context;
}
}*/

/**
* <p>
Expand All @@ -185,9 +185,9 @@ protected Context createContext(HttpServletRequest request, HttpServletResponse
*
* @param request servlet request from client
* @param response servlet reponse to client
*/
protected void setContentType(HttpServletRequest request, HttpServletResponse response) {
response.setContentType(defaultContentType);
}
}*/

}

0 comments on commit d5e766e

Please sign in to comment.