如何将 ArrayList 从一个 servlet 传递到另一个 servlet?
我已经将 arraylist1 从一个 servlet 发送到另一个 servlet。有用。现在我想将 arraylist2 传递给另一个 jsp/servlet,但出现错误:java.util.nullPointer Exception
。我该如何解决这个问题?
I have already sent arraylist1 from one servlet to another. It works. Now I want to pass arraylist2 to another jsp/servlet, but I get an error: java.util.nullPointer Exception
. How can I resolve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
应该是
路径是页面结束地址:
http://localhost/yourApp/pathToYourServlet
should be
The path is the end of the page adress:
http://localhost/yourApp/pathToYourServlet
您需要查看空指针的完整堆栈跟踪以确定它来自哪里。然后您应该逐行调试以查看空值在哪里。从那里您应该能够追溯到源头。这些是非常笼统的陈述,但鉴于提供的信息很少,它们是我解决您的问题的方式。
You need to look at the full stack trace of the null pointer to establish where it is coming from. Then you should debug through that line by line to see where the null is. From there you should be able to back trace to the source. These are very general statements, but they are how I would approach your problem given the little information provided.