I am displaying data recieved from a jsp page 'A' in jsp page 'B'. My code to to do the display is as follow:
My question is, how do I implemet something similar in a servlet? This is what I did:
obvously this allows for the value to be displayed, but only one value. It dosen't help to display multiple values like the earlier jsp example. How do I achieve something like that in a servlet? Hope someone can advise. Thanks.
1. These techniques are SO outmoded - you should not use them in new code
2. Look through some of the recent threads in the JSP forum and see what Bear has to say about using scriptlets in JSPs. Poor, patient Bear has to remind people about this thing a few times a day, I'm afraid.
3. Why would you want to fall back on servlets to produce markup? That's stepping even further back into obsolescence than you were when you were using scriptlets in your JSPs.
4. Remember (or know that) a JSP is essentially a servlet. JSPs are meant to be used to further separate the responsibilities of the Controller and the View 5. See the JSP forum and look for what Bear says about things like this. (Yes, I'm aware this is a repeat of #2 but it's something worth mentioning again -- so do it!)