0

I want to click a button "sign up", then it will go to the page 'signup.xhtml'.

<h:commandLink action="#{request.contextPath}/faces/signup.xhtml" value="sign up" />    

I received an error message:

/index.xhtml @25,90 action="#{request.contextPath}/faces/signup.xhtml" Not a Valid Method Expression: #{request.contextPath}/faces/signup.xhtml

Edited: Per suggestion here: How can I redirect in JSF 2.0,

I used this:

<h:commandLink action="/signup?faces-redirect=true" value="sign up" />

But received another problem:

javax.el.PropertyNotWritableException: /index.xhtml @21,33 value="": Illegal Syntax for Set Operation

Why does it complain @21 at index.xhtml, and doesn't directly redirect to the page signup.xhtml?

Community
  • 1
  • 1
user697911
  • 10,043
  • 25
  • 95
  • 169

0 Answers0