【发布时间】:2013-08-17 04:10:02
【问题描述】:
我有一个html表单
<form id="branch" method="get" action="/x/local/.../perl_code.pl">
Branch Name : <input type="text" name="textBox">
<input type="submit" value="Generate">
</form>
在 perl_code.pl 我有这个
use strict;
use warnings;
use CGI qw(:standard);
my $value = uc(param('textBox'));
system "perl /x/local/.../perl_CODE21.pl $value";
#other system commands that work and output the index2.html
print redirect(-url=>'http://server.com:8080/project_name/index2.html');
我最终想要做的是,从index1.html 中的文本框中获取输入,检索perl_code 中的值并执行一些system 命令打印出index2.html,最后将其重定向到index2.html .我试图手动检查所有其他系统命令及其输出,它们可以工作。我无法检索文本值并传递它,并且重定向也不起作用。浏览器重定向到perl_code.pl 并给出 404。我目前的时间不多了。简单的答案将不胜感激。
编辑:
这是一个 servlet 程序,所以如果有的话,也建议对 web.xml 进行任何修改。
【问题讨论】:
标签: html perl redirect http-status-code-404