This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Why spring form tag doesn't work in .jsp page?

 
Ranch Hand
Posts: 61
1
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Spring form tag is not working in my jsp page. I can't find where the problem is. If I write this code (only using html)

it works perfectly but when I try to use spring form tag, like this:
I get an error

Type Exception Report

Message Request processing failed; nested exception is org.apache.tiles.request.render.CannotRenderException: An exception occurred processing [/WEB-INF/templates/default.jsp] at line [13]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.tiles.request.render.CannotRenderException: An exception occurred processing [/WEB-INF/templates/default.jsp] at line [13]

10:
11: <tiles:insertAttribute name="header"/>
12: <tiles:insertAttribute name="menu"/>
13: <tiles:insertAttribute name="content"/>
14: <tiles:insertAttribute name="player"/>
15: <tiles:insertAttribute name="footer"/>
16:


I use Apache tiles it works for other pages. There is no problem with 13th line for other jsp files. I have included the taglibs to the .jspf file. And these taglibs (like core, security) are working fine for other pages. I included spring form taglib to to this .jspf file also (I mean it should work too).
 
Sheriff
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're getting messages which say "An exception occurred". It would be helpful to know more about that exception. So could you look through the logs and see if you can find a stack trace for it?
 
Asif Haciyev
Ranch Hand
Posts: 61
1
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Clapham wrote:You're getting messages which say "An exception occurred". It would be helpful to know more about that exception. So could you look through the logs and see if you can find a stack trace for it?


Thank you, Paul. I found my mistake, I didn't notice it.
I added this controller:


Actually firstly I wanted to create bootstrap modal for user registration, searched a lot and I didn't find right (or exact or maybe I didn't understand) example. Then I decided to use seperate page for registration. But it doesn't satisfy me. I want to do registration process with bootstrap modal. So, could you give an example or could you show me the steps (one by one) to achieve it.
 
Greenhorn
Posts: 18
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My recommendation is to not use Spring tags to render html.  Write your html normally and use JSTL tags within the jsp to render dynamic content into the page.  Tags that attempt to render the markup itself only limit what you can accomplish using html and css.  

For this reason I recommend never using JSF.
 
Saloon Keeper
Posts: 5711
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tags that attempt to render the markup itself only limit what you can accomplish using html and css.


While on a theoretical level that is correct, I disagree with the notion that this is an actual problem. Lots of server-side frameworks based on tags exist that do not constrain their users in any meaningful way. And if there is that rare occasion that they do, it's generally possible to extend those tags to add the missing functionality. That's much easier than to avoid such frameworks altogether, which isn't a viable approach to development these days. (All this assumes using server-side frameworks, obviously - it's client-side frameworks where most of the action is these days.)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!