HTTP Status 404 - No result defined for action com.test.action.UploadAction and

本文介绍了解决HTTPStatus404错误的方法,包括检查Struts配置、确保action属性与Java文件匹配以及正确设置表单enctype属性。
HTTP Status 404 - No result defined for action com.test.action.UploadAction and result input 的解决办法:

问题原因分析:
1:你定义的action没有在struts.xml中注册。
2:action所处理的filed域和对应的action这个java文件中的属性名不同。
3:容易忽视的是,你的form表单中没有这个属性,enctype ="multipart/form-data" ,或者这个属性用的默认值application/x-www-form-urlencoded

解释:enctype属性的意思是设置表单的MIME编码,默认情况下的application/x-www-form-urlencoded这个属性值不能用于文件上传。
gacia@debian-NextCloud-25:~$ sudo apt reinstall nginx-core --assume-yes 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: liburing2 使用'sudo apt autoremove'来卸载它(它们)。 升级了 0 个软件包,新安装了 0 个软件包,重新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。 需要下载 516 kB 的归档。 解压缩后会消耗 0 B 的额外空间。 获取:1 https://mirrors.aliyun.com/debian-security bullseye-security/main amd64 nginx-core amd64 1.18.0-6.1+deb11u4 [516 kB] 已下载 516 kB,耗时 0秒 (1,251 kB/s) (正在读取数据库 ... 系统当前共安装有 244641 个文件和目录。) 准备解压 .../nginx-core_1.18.0-6.1+deb11u4_amd64.deb ... 正在解压 nginx-core (1.18.0-6.1+deb11u4) 并覆盖 (1.18.0-6.1+deb11u4) ... 正在设置 nginx-core (1.18.0-6.1+deb11u4) ... Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details. invoke-rc.d: initscript nginx, action "start" failed. × nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Mon 2025-06-09 14:25:25 CST; 9ms ago Duration: 1h 2min 5.665s Docs: man:nginx(8) Process: 41379 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) CPU: 24ms 6月 09 14:25:25 debian-NextCloud-25 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server... 6月 09 14:25:25 debian-NextCloud-25 nginx[41379]: nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/nextcloud.conf:9 6月 09 14:25:25 debian-NextCloud-25 nginx[41379]: nginx: configuration file /etc/nginx/nginx.conf test failed 6月 09 14:25:25 debian-NextCloud-25 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE 6月 09 14:25:25 debian-NextCloud-25 systemd[1]: nginx.service: Failed with result 'exit-code'. 6月 09 14:25:25 debian-NextCloud-25 systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server. Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units. dpkg: 处理软件包 nginx-core (--configure)时出错: 已安装 nginx-core 软件包 post-installation 脚本 子进程返回错误状态 1 正在处理用于 man-db (2.11.2-2) 的触发器 ... 在处理时有错误发生: nginx-core E: Sub-process /usr/bin/dpkg returned an error code (1)
06-10
speech_recognition.elf C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Espressif\tools\xtensa-esp-elf\esp-14.2.0_20241119\xtensa-esp-elf\bin\xtensa-esp32s3-elf-g++.exe -mlongcalls -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -Wl,--cref -Wl,--defsym=IDF_TARGET_ESP32S3=0 -Wl,--Map=C:/TPC/IOT/IoT_Pad_MIC_Test/AI_Pad_Test/Src/build/speech_recognition.map -Wl,--no-warn-rwx-segments -Wl,--orphan-handling=warn -fno-rtti -fno-lto -Wl,--gc-sections -Wl,--warn-common -T esp32s3.peripherals.ld -T esp32s3.rom.ld -T esp32s3.rom.api.ld -T esp32s3.rom.bt_funcs.ld -T esp32s3.rom.libgcc.ld -T esp32s3.rom.wdt.ld -T esp32s3.rom.version.ld -T esp32s3.rom.newlib.ld -T memory.ld -T sections.ld @CMakeFiles\speech_recognition.elf.rsp -o speech_recognition.elf && cd ." C:/Espressif/tools/xtensa-esp-elf/esp-14.2.0_20241119/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: esp-idf/main/libmain.a(esp32_s3_szp.c.obj): in function `bsp_i2c_init': C:/TPC/IOT/IoT_Pad_MIC_Test/AI_Pad_Test/Src/main/esp32_s3_szp.c:9: multiple definition of `bsp_i2c_init'; esp-idf/main/libmain.a(main.c.obj):C:/TPC/IOT/IoT_Pad_MIC_Test/AI_Pad_Test/Src/components/PeripheralInit/I2C/I2C.c:29: first defined here collect2.exe: error: ld returned 1 exit status ninja: build stopped: subcommand failed. Traceback (most recent call last): File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf.py", line 855, in <module> main() File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf.py", line 745, in main cli(argv, prog_name=PROG, complete_var=SHELL_COMPLETE_VAR) File "C:\Espressif\python_env\idf5.4_py3.11_env\Lib\site-packages\click\core.py", line 1161, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Espressif\python_env\idf5.4_py3.11_env\Lib\site-packages\click\core.py", line 1082, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Espressif\python_env\idf5.4_py3.11_env\Lib\site-packages\click\core.py", line 1729, in invoke return _process_result(rv) ^^^^^^^^^^^^^^^^^^^ File "C:\Espressif\python_env\idf5.4_py3.11_env\Lib\site-packages\click\core.py", line 1666, in _process_result value = ctx.invoke(self._result_callback, value, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Espressif\python_env\idf5.4_py3.11_env\Lib\site-packages\click\core.py", line 788, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf.py", line 640, in execute_tasks task(ctx, global_args, task.action_args) File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf.py", line 212, in __call__ self.callback(self.name, context, global_args, **action_args) File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf_py_actions\core_ext.py", line 50, in build_target run_target(target_name, args, force_progression=GENERATORS[args.generator].get('force_progression', False)) File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf_py_actions\tools.py", line 499, in run_target RunTool(generator_cmd[0], generator_cmd + [target_name], args.build_dir, env, custom_error_handler, hints=not args.no_hints, File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf_py_actions\tools.py", line 333, in __call__ for hint in generate_hints(stderr_output_file, stdout_output_file): File "C:\Espressif\frameworks\esp-idf-v5.4\tools\idf_py_actions\tools.py", line 267, in generate_hints yield from generate_hints_buffer(file.read(), hints) ^^^^^^^^^^^ UnicodeDecodeError: 'cp932' codec can't decode byte 0x84 in position 162859: illegal multibyte sequence
最新发布
08-01
gacia@debian-NextCloud-25:~$ sudo apt update && sudo apt install openssl -y 命中:1 https://mirrors.aliyun.com/debian bullseye InRelease 获取:2 https://mirrors.aliyun.com/debian-security bullseye-security InRelease [27.2 kB] 获取:3 https://mirrors.aliyun.com/debian bullseye-updates InRelease [44.1 kB] 获取:4 https://mirrors.aliyun.com/debian bullseye-backports InRelease [49.0 kB] 获取:5 https://mirrors.aliyun.com/debian-security bullseye-security/main Sources [243 kB] 命中:6 https://packages.sury.org/php bookworm InRelease 获取:7 https://mirrors.aliyun.com/debian-security bullseye-security/main amd64 Packages [380 kB] 命中:8 http://repo.mysql.com/apt/debian bookworm InRelease 已下载 743 kB,耗时 1秒 (683 kB/s) 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 所有软件包均为最新。 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 openssl 已经是最新版 (3.0.16-1~deb12u1)。 openssl 已设置为手动安装。 下列软件包是自动安装的并且现在不需要了: liburing2 使用'sudo apt autoremove'来卸载它(它们)。 升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。 有 1 个软件包没有被完全安装或卸载。 解压缩后会消耗 0 B 的额外空间。 正在设置 nginx-core (1.18.0-6.1+deb11u4) ... Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details. invoke-rc.d: initscript nginx, action "start" failed. × nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Mon 2025-06-09 14:32:05 CST; 8ms ago Duration: 1h 2min 5.665s Docs: man:nginx(8) Process: 42069 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) CPU: 25ms 6月 09 14:32:05 debian-NextCloud-25 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server... 6月 09 14:32:05 debian-NextCloud-25 nginx[42069]: nginx: [emerg] no "ssl_certificate" is defined for the "listen ... ssl" directive in /etc/nginx/sites-enabled/nextcloud.conf:9 6月 09 14:32:05 debian-NextCloud-25 nginx[42069]: nginx: configuration file /etc/nginx/nginx.conf test failed 6月 09 14:32:05 debian-NextCloud-25 systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE 6月 09 14:32:05 debian-NextCloud-25 systemd[1]: nginx.service: Failed with result 'exit-code'. 6月 09 14:32:05 debian-NextCloud-25 systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server. Warning: The unit file, source configuration file or drop-ins of nginx.service changed on disk. Run 'systemctl daemon-reload' to reload units. dpkg: 处理软件包 nginx-core (--configure)时出错: 已安装 nginx-core 软件包 post-installation 脚本 子进程返回错误状态 1 在处理时有错误发生: nginx-core E: Sub-process /usr/bin/dpkg returned an error code (1) gacia@debian-NextCloud-25:~$
06-10
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值