Benas
Benas

Reputation: 2332

JSF2 navigating to *.xhtml files from subfolder *.xhtml file

Is there any way how can navigation from file "file1.xhtml" to another file "file2.xhtml" which is located in parent folder be implemented that "faces-config.xml" navigation is not used at all.

ProjectName
+---+
    WebContent
    +---+
    |   subfolder
    |   +---+
    |       file1.xhtml
    +---+
        file2.xhtml

Navigation from file2.xhtml to file1.xtml:

<h:link value="Go to file1" outcome="subfolder/file2" />

Navigation from file1.xhtml to file2.xtml:

<h:link value="Go to file2" outcome="?" />

Upvotes: 1

Views: 2031

Answers (1)

Daniel
Daniel

Reputation: 37061

The following should work

<h:link value="Go to file1" outcome="/file1" />

Upvotes: 2

Related Questions