File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes option list - where to put the jsp tag? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "option list - where to put the jsp tag?" Watch "option list - where to put the jsp tag?" New topic
Author

option list - where to put the jsp tag?

tangara goh
Ranch Hand

Joined: Dec 27, 2009
Posts: 125
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

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?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
tangara goh
Ranch Hand

Joined: Dec 27, 2009
Posts: 125
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

Joined: Jan 10, 2002
Posts: 61766
    
  67

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

Joined: Dec 27, 2009
Posts: 125
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

Joined: Sep 15, 2009
Posts: 806

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.


Love all, trust a few, do wrong to none.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: option list - where to put the jsp tag?