• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is this the best way to get at dynamic data?

 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given that I'm working with the JSP 1.2 spec (as opposed to JSP 2.0), I'm wondering what the "best" way to get at information from a JSP would be. For example, if I need to get at a request atttribute, I could do this:



Of course, we all know that we shouldn't put scripting into our pages. Unfortunately, under the 1.2 spec, I don't have access to EL. However, I can do this:



Is that really much better? Is there a better way to do this?

Thanks,
Corey
[ October 25, 2004: Message edited by: Corey McGlone ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using taglibs is always better IMO than using scriplets. So I would so go that route.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Absolutely. Use the JSTL/EL as much as you can within the limits of JSP 1.2. That will not only make for "neater" pages, transitioning them to JSP 2.0 when the time comes will be a snap.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!