Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8784921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:13:36+00:00 2026-06-13T21:13:36+00:00

Basic problem I’ve come across a bit of a problem while writing my own

  • 0

Basic problem
I’ve come across a bit of a problem while writing my own custom JSP tags to “wrap” the spring MVC form tags. I’ve wrapped other tags successfully but come unstuck with the select and options tags, this throws an IlleagalStateException. I’ve debugged the spring code and found that the options tag looks for an ancestor select tag. I’m doing this with tag files so the spring select tag is actually in a different tag file. I guess that’s why it doesn’t find it.

So the questions is what can I do to get round this?

Possible solutions
I’ve tried looking for solutions but all I’ve found is other people having the same problem but no solution posted. I did ponder writing my own select and options tags without using the spring tags but I don’t really want to have to replicate the binding that it gives you for free. I don’t mind changing to use Java classes rather than tag files but I found previously that the output won’t be evaluated as a JSP so you can’t output another JSP tag.

Reasons for doing this
Having thought about this for a week since first asking the question I am now clearer on what I want to achieve.

  • To simplify the markup needed in my JSP’s
  • Factoring out common code (e.g. form:errors after an input or getting a translation from spring:message)
  • To encapsulate look and feel (CSS goes a long way but often you need to change the markup too)
  • To be able to build enhanced components that extend the functionallity of the spring tags (e.g. render a multi-select as a picklist or display readonly inputs as text labels)

I’ll be interested to hear what people think.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T21:13:37+00:00Added an answer on June 13, 2026 at 9:13 pm

    I’ve thought about this for a good week now and this is the shortlist:

    • Give up and directly use the spring tags in my JSP’s
    • Don’t use the spring tags at all and replicate their logic in my own tags
    • Possibly write a tag class that extends or makes use of the spring tag class
    • Expand the scope of my tags to wrap both the select and options tags

    Given the reasons for wanting to do this (which I have now clarified in the question), I’ve decided to go for the last option. I wasn’t keen on this originally because I thought I might end up with hundreds of parameters but it’s actually not too bad. The tag files are designed for wrapping common bits of markup so this is what they’re for. I’ve also wrapped my own tag further so there is a picklist tag which outputs my custom select tag and then writes the JS needed to initialise it.

    I think this is the best of the possible solutions I’ve come across based on what I wanted to achieve. This is what I’m going with but I’d still be interested to hear of other peoples solutions if they think they have something better.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a wordpress theme, and have run into a fairly basic problem.
I am facing a basic problem in my jsp. I have a jsp. There
My basic problem is to generate 2d renders of 3d objects, such as one
Problem The basic problem is I want to debug some 3rd party code to
I have such a basic problem in Delphi,I can't solve it. My Code: Note:DataR
I have a pretty basic problem but I can't seem to figure it out...
I think i have a basic problem in understanding the dojo toolkit. Well I
I'm having a really basic problem with NSString stringWithFormat. I want to take the
I'm stuck on a really, really basic problem: Using HttpRequest to POST a wee
So I have a rather basic javascript problem which I have been slamming my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.