Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 WebSphere Application Server 上使用 Apache Myfaces 2.2。
我有一个 JSF 页面,它“测试”与文件系统和数据库的连接。
当连接失败时,我想返回另一个 HTTP 状态码。我怎样才能用 JSF 做到这一点?
试试 response.setStatus();
有关更多详细信息,此链接将很有帮助:
https://stackoverflow.com/a/16777616/1763602