0

I have my my app url: 127.0.0.1:8080/reader/read.xhtml The read.xhtml is populated thorough database and has got various links which are hard coded in database. (read.xhtml is actually retrieved as String from DB.)
for e.g. there are links (<a href ="/write.xhtml>write</a>) /write.xhtml /upload.xhtml as I cannot add the context when i click the link it directs me to WWW://127.0.0.1:8080/write.xhtml or HTTP://127.0.0.1:8080/upload.xhtml

Is there any way I can redirect the link to HTTP://127.0.0.1:8080/reader/write.xhtml. Can Prettyfaces handle this. If yes how?

Freak
  • 6,786
  • 5
  • 36
  • 54

1 Answers1

0

You can simply add the context path to the links by rendering it in front of your links. Something like:

<a href="#{request.contextPath}/#{someBean.linkFromDatabase}">write</a>
chkal
  • 5,598
  • 21
  • 26