• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Navigation using h:commandLink

 
Ayub ali khan
Ranch Hand
Posts: 394
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to use h:commandLink to navigate to a different page, similar to href in html. Following is the code:

==================
abc.jsp
===================
<h:form>
<h:commandLink action="interface" >
<hutputText value="100"/>
</h:commandLink>

</h:form>


=====================
faces-config.xml
=====================

<navigation-rule>

<navigation-case>
<from-outcome>interface</from-outcome>
<to-view-id>/pages/interfacePage.jsp</to-view-id>
<redirect />
</navigation-case>

</navigation-rule>

I am getting the following error when I click the hyper link:
=======================================================================
The server encountered an internal error () that prevented it from fulfilling this request.

java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUpload
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:117)

=======================================================================

Please help me resolve this issue.

Thanks and Regards
Ayub
 
Ayub ali khan
Ranch Hand
Posts: 394
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I changed my faces-config.xml file as follows:

<navigation-rule>
<from-view-id>*</from-view-id>
<navigation-case>
<from-outcome>interface</from-outcome>
<to-view-id>/pages/interfacePage.jsf</to-view-id>
</navigation-case>

</navigation-rule>

This resovled the issue. My mistake

Best Regards
Ayub
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic