mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
+2
-4
@@ -27,15 +27,13 @@ import jakarta.servlet.ServletContext;
|
||||
|
||||
import org.apache.tiles.request.ApplicationContext;
|
||||
import org.apache.tiles.request.servlet.ServletUtil;
|
||||
// import org.apache.velocity.tools.view.JeeConfig;
|
||||
import org.apache.velocity.tools.view.JeeConfig;
|
||||
|
||||
/**
|
||||
* Implements JeeConfig to use parameters set through
|
||||
*/
|
||||
public class ApplicationContextJeeConfig /*implements JeeConfig*/ {
|
||||
public class ApplicationContextJeeConfig implements JeeConfig {
|
||||
|
||||
// TODO: Velocity-tools requires javax
|
||||
|
||||
/**
|
||||
* The application context.
|
||||
*/
|
||||
|
||||
+3
-5
@@ -36,9 +36,7 @@ import org.apache.velocity.tools.view.VelocityView;
|
||||
* the response. To initialize it correctly, call #setParameter(String, String)
|
||||
* for all the parameters that you want to set, and then call #commit().
|
||||
*/
|
||||
public class VelocityRenderer /*implements Renderer*/ {
|
||||
|
||||
// TODO: Velocity-tools requires javax
|
||||
public class VelocityRenderer implements Renderer {
|
||||
|
||||
/**
|
||||
* The VelocityView object to use.
|
||||
@@ -54,7 +52,7 @@ public class VelocityRenderer /*implements Renderer*/ {
|
||||
this.velocityView = velocityView;
|
||||
}
|
||||
|
||||
/* @Override
|
||||
@Override
|
||||
public void render(String path, Request request) throws IOException {
|
||||
if (path == null) {
|
||||
throw new CannotRenderException("Cannot dispatch a null path");
|
||||
@@ -69,7 +67,7 @@ public class VelocityRenderer /*implements Renderer*/ {
|
||||
|
||||
// merge the template and context into the writer
|
||||
velocityView.merge(template, context, request.getWriter());
|
||||
}*/
|
||||
}
|
||||
|
||||
public boolean isRenderable(String path, Request request) {
|
||||
return path != null && path.startsWith("/") && path.endsWith(".vm");
|
||||
|
||||
Reference in New Issue
Block a user