dongshijiao6890 2015-04-23 04:53 采纳率: 0%
浏览 49

PHP将zip文件发布到java servlet会导致NullPointerException

I've got a Java servlet program that receives a zip file and then extract it to a location on the server to replace some templating files of a website (HTML, PNG, etc). Now, one of my colleagues wants to try using it with PHP, but then we encountered quite a peculiar problem with this combination.

At first, I always got NullPointerException on the HttpRequest.getParameter function on Java, even though I did send the files via php_curl to the servlet. the strange thing is, if I send the same file via Ruby, Python, or any other method (HTML, for example) it works well with no error generated.

After a lot of tinkering around, i've found that php will successfully send the zip file to java servlet only after i've removed some file inside it, the files which are causing this issue turns out to be the fonts which consist of .woff, .eot, .svg, and .ttf.

Is there any workaround for this issue other than removing the font file from my zip file?

configuration : PHP 5.6 using guzzle and other curl library Java 1.7, Java EE 7, servlet api 3.1, running on WildFly 8.2 server

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 2024-五一综合模拟赛
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭