Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set HTTP status code with JSF?

I use Apache Myfaces 2.2 on WebSphere Application Server.

I have a JSF page, which "test" the conenction to filesystem and database.

When the connection fails, I want to return another HTTP Status Code. How can I do this with JSF?

like image 205
veote Avatar asked Nov 23 '25 06:11

veote


1 Answers

Try response.setStatus();

for more details this link will be helpful :

https://stackoverflow.com/a/16777616/1763602

like image 92
Angelika Avatar answered Nov 24 '25 21:11

Angelika