jfianl 4.9 怎样直接访问jsp页面?

直接访问jsp页面报错 404

评论区

仙魔

2021-02-19 17:57

JFinal

2021-02-19 17:58

加配置 me.set DenyAccessJsp(false)

SuperEric

2021-02-19 18:29

https://jfinal.com/doc/1-5

SuperEric

2021-02-19 18:32

import org.apache.jasper.deploy.TagLibraryInfo;
import io.undertow.jsp.HackInstanceManager;
import io.undertow.jsp.JspServletBuilder;

UndertowServer.create(AppConfig.class).configWeb(wb -> {
wb.getDeploymentInfo().addServlet(JspServletBuilder.createServlet("Default Jsp Servlet", "*.jsp"));

HashMap tagLibraryInfo = new HashMap();
JspServletBuilder.setupDeployment(wb.getDeploymentInfo(), new HashMap(), tagLibraryInfo,
new HackInstanceManager());
}).start();

仙魔

2021-02-20 13:46

@JFinal 嗯 好了