• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

help me to avoid scriptlets, declaration & expression...

 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


The above JSP displays the list of possible names in a table when user enters any string in previous JSP and submit.

But this JSP has scriptlet, declaration and expression, which shouldn't be in a JSP.

What you will do to avoid these in JSP, I mean, how you will replace these by EL, Actions or Custom Tags...

Thanks.
[ June 13, 2006: Message edited by: rathi ji ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure this actually works ? What is getMatchingNames doing ?
Could you send a possible value for "enteredString" because I tried it and I keep getting exceptions.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Satou kurinosuke:
Are you sure this actually works ? What is getMatchingNames doing ?
Could you send a possible value for "enteredString" because I tried it and I keep getting exceptions.



It's working at my machine.

getMatchingNames() method actually returns the list of names which matches with the string entered by user.

What exceptions you are getting?
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Satou kurinosuke:
Are you sure this actually works ? What is getMatchingNames doing ?
Could you send a possible value for "enteredString" because I tried it and I keep getting exceptions.



'enteredString' could be any string like "p", "bu" etc.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
will it work if you input "aaaaaaaaaaaaaaaa" ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyway, you try this way :
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Satou kurinosuke:
will it work if you input "aaaaaaaaaaaaaaaa" ?



This version will work:



Thanks.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Will with the JSTL version, no need to check for the size.
 
ankur rathi
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Satou kurinosuke:
Anyway, you try this way :



Thanks a lot Satou,

What about using custom tag. Which one would you or anyone prefer?

Thanks.
reply
    Bookmark Topic Watch Topic
  • New Topic