Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

option list - where to put the jsp tag?

 
tangara goh
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm tyring to include the jsp tag in my option list. However, I'm not sure where to insert the jsp tag under the Type such that when I run the page, the options will come out - showing User 1 and User2.

Hope someone can advise me. Thanks.



Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those aren't tags, they're scriptlets. And they're outdated and a bad idea. At this point, you should be using the EL to insert dynamic data into your JSPs.

That said, I'm not sure what you are asking. It almost sounds like an HTML question: how to format option tags?
 
tangara goh
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This place is like not for beginner like me. I havn't learn EL so that's the only best way to do...using scriplets.

If possible, I hope you can show me where to insert the below scriplet
<%=strType%>
so that the option will show the user1 and user2.

Thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65113
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tangara goh wrote:This place is like not for beginner like me. I havn't learn EL so that's the only best way to do...using scriplets.

If you are beginner, it's even more important to learn the right way right off the bat. Why do you think you should do things using outdated methods just because you are a beginner?

If possible, I hope you can show me where to insert the below scriplet
<%=strType%>
so that the option will show the user1 and user2.

I'm still not sure what you are asking. Show where? Please TellTheDetails.
 
tangara goh
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will have to pick up EL later cos time is not on my side.....

At the mean time, I'd appreciate it if you could tell me the scriplets so that the option will show up in a html form.

Tks alot.
 
chaitanya karthikk
Ranch Hand
Posts: 806
Java MySQL Database Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi tangara, I did not understand the question properly, I am writing this from what I have understood. I think that you are getting something from database and you want to represent those in a drop down box. For that one thins this the code, please excuse me if you are not lokking for this one.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The options *do* come out showing "User 1" and "User 2"; that's how you have it coded:However, you have an additional </td> end tag, which means your HTML is malformed, and won't work the way you expect. Try removing it.

To Bear's point: learn EL. It takes a matter of minutes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic