Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2940 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  tomcat + spring form taglib

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

tomcat + spring form taglib

n°1910947
burgergold
5$? va chez l'diable!
Posté le 01-08-2009 à 21:44:59  profilanswer
 

Voilà, je suis en train de faire ce simple tutorial qui jusqu'à présent allait plutot bien
http://static.springsource.org/doc [...] index.html
 
voila à la fin du chapitre 4, ca ne fonctionne pas. On dirait qu'il ne trouve pas mal taglib spring-form.tld
 
dans mon web.xml, j'ai bien

Code :
  1. <jsp-config>
  2.     <taglib>
  3.       <taglib-uri>/spring</taglib-uri>
  4.       <taglib-location>/WEB-INF/tld/spring-form.tld</taglib-location>
  5.     </taglib>
  6.   </jsp-config>


 
dans mon jsp

Code :
  1. <%@ include file="/WEB-INF/jsp/include.jsp" %>
  2. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
  3. <html>
  4. <head>
  5.   <title><fmt:message key="title"/></title>
  6.   <style>
  7.     .error { color: red; }
  8.   </style> 
  9. </head>
  10. <body>
  11. <h1><fmt:message key="priceincrease.heading"/></h1>
  12. <form:form method="post" commandName="priceIncrease">
  13.   <table width="95%" bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
  14.     <tr>
  15.       <td align="right" width="20%">Increase (%):</td>
  16.         <td width="20%">
  17.           <form:input path="percentage"/>
  18.         </td>
  19.         <td width="60%">
  20.           <form:errors path="percentage" cssClass="error"/>
  21.         </td>
  22.     </tr>
  23.   </table>
  24.   <br>
  25.   <input type="submit" align="center" value="Execute">
  26. </form:form>
  27. <a href="<c:url value="hello.htm"/>">Home</a>
  28. </body>
  29. </html>


 
 
dans mon projet
WebContent/WEB-INF
WebContent/WEB-INF/jsp
WebContent/WEB-INF/jsp/hello.jsp
WebContent/WEB-INF/jsp/include.jsp
WebContent/WEB-INF/jsp/priceincrease.jsp
WebContent/WEB-INF/lib
WebContent/WEB-INF/tld
WebContent/WEB-INF/sping-form.tld
WebContent/WEB-INF/messages.properties
WebContent/WEB-INF/springapp-servlet.xml
WebContent/WEB-INF/web.xml
WebContent/index.jsp
 
 
et mon exception...

Code :
  1. type Exception report
  2. message
  3. description The server encountered an internal error () that prevented it from fulfilling this request.
  4. exception
  5. org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/priceincrease.jsp at line 18
  6. 15:     <tr>
  7. 16:       <td align="right" width="20%">Increase (%):</td>
  8. 17:         <td width="20%">
  9. 18:           <form:input path="percentage"/>
  10. 19:         </td>
  11. 20:         <td width="60%">
  12. 21:           <form:errors path="percentage" cssClass="error"/>
  13. Stacktrace:
  14. org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
  15. org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
  16. org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
  17. org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
  18. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  19. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  20. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  21. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  22. java.lang.reflect.Method.invoke(Method.java:616)
  23. org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
  24. java.security.AccessController.doPrivileged(Native Method)
  25. javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
  26. org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
  27. org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
  28. java.security.AccessController.doPrivileged(Native Method)
  29. java.security.AccessController.doPrivileged(Native Method)
  30. org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:236)
  31. org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257)
  32. org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1183)
  33. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
  34. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
  35. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
  36. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
  37. javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  38. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  39. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  40. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  41. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  42. java.lang.reflect.Method.invoke(Method.java:616)
  43. org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
  44. java.security.AccessController.doPrivileged(Native Method)
  45. javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
  46. org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
  47. org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
  48. root cause
  49. java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
  50. java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
  51. java.security.AccessController.checkPermission(AccessController.java:553)
  52. java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
  53. java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1311)
  54. org.springframework.beans.BeanUtils.findEditorByConvention(BeanUtils.java:368)
  55. org.springframework.validation.AbstractPropertyBindingResult.getCustomEditor(AbstractPropertyBindingResult.java:110)
  56. org.springframework.validation.AbstractPropertyBindingResult.formatFieldValue(AbstractPropertyBindingResult.java:87)
  57. org.springframework.validation.AbstractBindingResult.getFieldValue(AbstractBindingResult.java:230)
  58. org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:120)
  59. org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:172)
  60. org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getPropertyPath(AbstractDataBoundFormElementTag.java:192)
  61. org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getName(AbstractDataBoundFormElementTag.java:158)
  62. org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.autogenerateId(AbstractDataBoundFormElementTag.java:145)
  63. org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.resolveId(AbstractDataBoundFormElementTag.java:136)
  64. org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.writeDefaultAttributes(AbstractDataBoundFormElementTag.java:120)
  65. org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:379)
  66. org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:139)
  67. org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:90)
  68. org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77)
  69. org.apache.jsp.WEB_002dINF.jsp.priceincrease_jsp._jspx_meth_form_005finput_005f0(priceincrease_jsp.java:231)
  70. org.apache.jsp.WEB_002dINF.jsp.priceincrease_jsp._jspService(priceincrease_jsp.java:112)
  71. org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  72. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  73. org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
  74. org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
  75. org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
  76. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  77. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  78. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  79. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  80. java.lang.reflect.Method.invoke(Method.java:616)
  81. org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
  82. java.security.AccessController.doPrivileged(Native Method)
  83. javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
  84. org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
  85. org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
  86. java.security.AccessController.doPrivileged(Native Method)
  87. java.security.AccessController.doPrivileged(Native Method)
  88. org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:236)
  89. org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:257)
  90. org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1183)
  91. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:902)
  92. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
  93. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
  94. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
  95. javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
  96. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  97. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  98. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  99. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  100. java.lang.reflect.Method.invoke(Method.java:616)
  101. org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
  102. java.security.AccessController.doPrivileged(Native Method)
  103. javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
  104. org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
  105. org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
  106. note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.


mood
Publicité
Posté le 01-08-2009 à 21:44:59  profilanswer
 

n°1910982
burgergold
5$? va chez l'diable!
Posté le 02-08-2009 à 13:41:20  profilanswer
 

up
 
tjrs pas trouvé :/

n°1911023
sircam
I Like Trains
Posté le 02-08-2009 à 20:20:15  profilanswer
 

check catalina.policy


---------------
Now Playing: {SYNTAX ERROR AT LINE 1210}
n°1911024
burgergold
5$? va chez l'diable!
Posté le 02-08-2009 à 20:27:26  profilanswer
 

je n'ai qu'un catalina.properties
root@burgergold:/etc/tomcat6# find /etc/tomcat6/ -name catalina*
/etc/tomcat6/catalina.properties
 
package.definition?
package.access?

n°1911025
sircam
I Like Trains
Posté le 02-08-2009 à 20:38:45  profilanswer
 

http://tomcat.apache.org/tomcat-6. [...] howto.html
 


---------------
Now Playing: {SYNTAX ERROR AT LINE 1210}
n°1911031
burgergold
5$? va chez l'diable!
Posté le 02-08-2009 à 20:58:08  profilanswer
 

ouin bin pas facile à géré, j'ai seulement mis la security à no
 
merci énormément


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  tomcat + spring form taglib

 

Sujets relatifs
Form indiqué en POST me renvoit les infos en GETPosition d'un composant dans un Form
Spring : Injection dépendance au démarrageCannot resolve file j_spring_security_check
Spring security[Spring Security] Authentification avec un Web service
Migration d'un appli tomcat sous jonas[Spring 2.5] Passer les données d'un formulaire au controleur
Spring Security Login RoleSpring Web MVC et Extjs
Plus de sujets relatifs à : tomcat + spring form taglib


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR