This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See you should be submitting to a servlet, not another JSP, with the id as a request param. The servlet can retrieve the info and forward to the JSP with the data in request scope.

Secondly, putting Java code in a JSP is a bad practice that has been obsolete and discredited for over 12 years.

One of the (very many) good reasons for that is a problem you have in your code that you probably don't even realize: it's not thread safe! As soon as more than one person tries to use your app, it will break, and it will break badly.
fred kitu
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks bear
im just now taking webapp class and i will rem that
do you have a sample servlet code i can refer to?
Bear Bibeault
Author and ninkuma
Posts: 66424
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlet examples will be all over the net!

If you must use Java scriptlets for your class (why scriptlets are being taught 12 years after their obsolescence is beyond me) always avoid using the <%! %> construct. It's nothing but trouble and certainly not needed here.

But if you can eliminate scriptlets entirely, that's even better!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!