thinkgem / jeesite

Java rapid development platform, based (Spring Boot, Spring MVC, Apache Shiro, MyBatis, Beetl, Bootstrap, AdminLTE), online code generation, including modules: Organization, role users, menu and button authorization, data permissions, system parameters, content management, workflow, etc. Loose coupling design is adopted; one key skin switch; account security Settings, password policies; Online scheduled task configuration; Support cluster, support SAAS; Support for multiple data sources
http://jeesite.com
Apache License 2.0
8k stars 5.66k forks source link

请教如何在jeesite1.2.7版本里配置CGI,以及java调用cgi下的exe文件路径 #482

Open Fun-HC opened 6 years ago

Fun-HC commented 6 years ago

环境:maven3.3.9、tomcat7.0.91、java7-u80、eclipse-j2ee-mars1 1、我在apache-tomcat-7.0.91里为了开启cgi做了如下配置: 1.1、修改了D:\apache-tomcat-7.0.91\conf\web.xml里关于cgi的servlet:

cgi org.apache.catalina.servlets.CGIServlet debug 0 cgiPathPrefix WEB-INF/cgi executable 5

1.2、修改了D:\apache-tomcat-7.0.91\conf\web.xml里关于cgi的servlet-mapping:

cgi /cgi-bin/*

1.3、修改了D:\apache-tomcat-7.0.91\conf\context.xml里的context标签

1.4、把要调用的Project.exe放在了如下位置 D:\apache-tomcat-7.0.91\webapps\cgi-example\WEB-INF\cgi\Project.exe 1.5、启动tomcat后,访问 http://localhost:8080/cgi-example/cgi-bin/Project.exe 成功运行了Project.exe 2.1、我在eclipse对jeesite\src\main\webapp\WEB-INF\web.xml做了许多修改 2.2、我也写了一个跳转到exe的java方法 @RequiresPermissions("class:class:view") @RequestMapping(value = "jump") public String change(Class class) { return "WEB-INF/views/modules/cgi/Project1.exe"; } 3.1、第二节操作均未使我在jeesite1.2.7里成功跳转到exe处,请教一下具体的配置教程,谢谢。
Fun-HC commented 6 years ago

`环境:maven3.3.9、tomcat7.0.91、java7-u80、eclipse-j2ee-mars1 1、我在apache-tomcat-7.0.91里为了开启cgi做了如下配置: 1.1、修改了D:\apache-tomcat-7.0.91\conf\web.xml里关于cgi的servlet:

cgi org.apache.catalina.servlets.CGIServlet debug 0 cgiPathPrefix WEB-INF/cgi executable 5

1.2、修改了D:\apache-tomcat-7.0.91\conf\web.xml里关于cgi的servlet-mapping:

cgi /cgi-bin/*

1.3、修改了D:\apache-tomcat-7.0.91\conf\context.xml里的context标签

1.4、把要调用的Project.exe放在了如下位置 D:\apache-tomcat-7.0.91\webapps\cgi-example\WEB-INF\cgi\Project.exe 1.5、启动tomcat后,访问 http://localhost:8080/cgi-example/cgi-bin/Project.exe 成功运行了Project.exe 2.1、我在eclipse对jeesite\src\main\webapp\WEB-INF\web.xml做了许多修改 2.2、我也写了一个跳转到exe的java方法 @RequiresPermissions("class:class:view") @RequestMapping(value = "jump") public String change(Class class) { return "WEB-INF/views/modules/cgi/Project1.exe"; } 3.1、第二节操作均未使我在jeesite1.2.7里成功跳转到exe处,请教一下具体的配置教程,谢谢。 `
Fun-HC commented 6 years ago

新的java方法如下 @RequiresPermissions("class:class:view") @RequestMapping(value = "jump") public String change(Class class) { return "cgi-bin/Project1.exe"; } 还是没办法调用 ba51929a372de09558120a712539a510_li