关于flask使用form表单的问题
部署到服务器后没有使用form的页面正常打开,使用form的页面就报错,如下:#Traceback(mostrecentcalllast):#File"/usr/lib6...
部署到服务器后没有使用form的页面正常打开,使用form的页面就报错,如下:
# Traceback (most recent call last):
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
# response = self.full_dispatch_request()
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1615, in full_dispatch_request
# return self.finalize_request(rv)
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1630, in finalize_request
# response = self.make_response(rv)
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1740, in make_response
# rv = self.response_class.force_type(rv, request.environ)
# File "/usr/lib/python2.7/site-packages/werkzeug/wrappers.py", line 921, in force_type
# response = BaseResponse(*_run_wsgi_app(response, environ))
# File "/usr/lib/python2.7/site-packages/werkzeug/test.py", line 942, in run_wsgi_app
# buffer.append(next(app_iter))
请问这是什么问题 展开
# Traceback (most recent call last):
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
# response = self.full_dispatch_request()
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1615, in full_dispatch_request
# return self.finalize_request(rv)
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1630, in finalize_request
# response = self.make_response(rv)
# File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1740, in make_response
# rv = self.response_class.force_type(rv, request.environ)
# File "/usr/lib/python2.7/site-packages/werkzeug/wrappers.py", line 921, in force_type
# response = BaseResponse(*_run_wsgi_app(response, environ))
# File "/usr/lib/python2.7/site-packages/werkzeug/test.py", line 942, in run_wsgi_app
# buffer.append(next(app_iter))
请问这是什么问题 展开
2018-09-05 · 知道合伙人互联网行家
关注
展开全部
一般action的路径配置你应该在struts.xml中给package加一个namespace,
然后让namespace的值和jsp文件夹的名字一致。
那么在写form 的action路径的时候,你就可以直接写相对路径了。例如
<form method="post" action="add_Emp.action">
而看到楼主action的请求有_ 应该是在struts.xml的action 中用了通配符吧
<action name="add_* " class="略" method="{1}">这样就是配置的通常用法
然后让namespace的值和jsp文件夹的名字一致。
那么在写form 的action路径的时候,你就可以直接写相对路径了。例如
<form method="post" action="add_Emp.action">
而看到楼主action的请求有_ 应该是在struts.xml的action 中用了通配符吧
<action name="add_* " class="略" method="{1}">这样就是配置的通常用法
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询