• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAVASCRIPT Error with commandlink

 
Mangala Madasamy Erulappan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have created a JSF application. But wheni submit the login page with commandlink i am getting javascript error "Object Expected".This prevents me from navigating to the next page. I have added the extension filters in my web.xml too but it is not working. Please help me.

This is my logon.jsp file:
<h:form id="loginForm">
<table border="1">
<tr>
<td >Log on</td>
</tr>
<tr>
<td>
<table border="0" >
<tr>
<td >Username: </td>
<td >
<h:inputText value="#{loginform.username}" id="username" styleClass="formInput" required="true"/>
</td>

</tr>

<tr>
<td >Password: </td>
<td >
<h:inputSecret value="#{loginform.password}" id="password" styleClass="formInput"/>
</td>
</tr>

<tr>
<td >
<h:commandLink action="#{loginform.onSubmit}" styleClass="buttonLinkNormal">
<hutputText value="Login"/>
</h:commandLink>
</td>
</tr>
</table>

</td>
</tr>
</table>

</h:form>

This is my web.xml:
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml,/WEB-INF/faces-navigation.xml</param-value>
</context-param>

<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationcontext.xml</param-value>
</context-param>
<!-- Extensions Filter -->
<filter>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>

<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>


<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>


<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!