Results 1 to 2 of 2
  1. #1
    linuxdoanpham is offline Member
    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Default Help me error <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%

    Config WEB.XML

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

    <display-name>SpringHello</display-name>

    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    <servlet>
    <servlet-name>SpringHello</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/spring/app-config.xml
    </param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>SpringHello</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    </web-app>
    ----------------------------------------
    Code JSP
    <form:form action="saveContact.do"
    method="post" commandname="newContact">
    <table style="border-collapse: collapse;">
    <tbody>
    <tr>
    <td width="" align="right">Name</td>
    <td><form:input path="id"></form:input></td>
    <td align="left"><form:errors path="id" cssstyle="color:red"></form:errors></td>
    </tr>
    <tr>
    <td colspan="" align="center"><input name="" value="Save"
    type="submit"> <input name="" value="Reset"
    type="reset"> <input value="Back"
    onclick="javascript:go('viewAllContacts.do');" type="button">



    </td>
    </tr>

    </tbody>
    </table>
    </form:form>

    ==================================
    Error
    org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/newContact.jsp at line 23

    20: <tbody>
    21: <tr>
    22: <td width="" align="right">Name</td>
    23: <td><form:input path="id"></form:input></td>
    24: <td align="left"><form:errors path="id" cssstyle="color:red"></form:errors></td>
    25: </tr>
    26: <tr>


    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:568)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:465)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    org.springframework.web.servlet.view.InternalResou rceView.renderMergedOutputModel(InternalResourceVi ew.java:238)
    org.springframework.web.servlet.view.AbstractView. render(AbstractView.java:250)
    org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1060)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:798)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:716)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,016
    Rep Power
    20

    Default Re: Help me error <%@taglib uri="http://www.springframework.org/tags/form" prefix="fo

    Use [code] tags [/code] when posting code.
    Is there any more information in the logs about the problem Jasper is having?
    Id 'id' a field on the command object? Though I wouldn't expect Jasper to throw an error for that, I would expect a compilation error...
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. problem with enctype="multipart/form-data" in the JSP page
    By varunphilip in forum Advanced Java
    Replies: 0
    Last Post: 11-19-2011, 07:11 AM
  2. Replies: 5
    Last Post: 07-13-2011, 02:25 PM
  3. Replies: 0
    Last Post: 06-24-2011, 08:14 PM
  4. Replies: 1
    Last Post: 01-21-2010, 09:20 AM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •