I have a simple form in JSF like this
<h:form>
<p:inputText id="name1" value="#{bean.name1}" maxlength="100" required="true"/>
<p:inputText id="contact1" value="#{bean.contact1}" required="true"/>
<p:commandButton
value="Save"
action="#{bean.saveForm()}"
validateClient="true" />
</h:form>
I tried deleting one of the input text in element inspector (F12 Chrome) and it actually bypass the 'required' validation for that field.
in my web.xml, I have included below code as suggested in In JSF, What is the best way to prevent Form tampering?
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
I read that JSF has automatically stored the viewState in server with above method, but turns out, I can still bypass it. Am I missing something?
Any helps would be appreciated. Thanks!