This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Setting default for a dropdown in JSP

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a dropdown on my JSP page which is populated from a DB. I'm trying to figure out how to make one of the items the default.



Dropdown values:
- BridgeStone
- UniRoyal (I want this as the default)
- GoodYear

 
Marshal
Posts: 67289
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basic HTML: give it the selected attribute.

As this is not a JSP question, but a Stripes question, it's been moved to the frameworks forum.
 
s daniel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Basic HTML: give it the selected attribute.

As this is not a JSP question, but a Stripes question, it's been moved to the frameworks forum.



Thanks Bear,

I'm still new to Stripes and programming in general. I'm not sure where to add it?

Like this???


How will I tell the app that "UniRoyal" should be the default?

Thanks for the help
 
Bear Bibeault
Marshal
Posts: 67289
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only the stripes documentation can tell you.
 
s daniel
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Only the stripes documentation can tell you.



The Solution:



http://stripes.sourceforge.net/docs/current/taglib/stripes/select.html

Thanks Bear for pointing me in the right direction.
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!