Skip to content
Advertisement

Variable returns null

In my project ,I need to pass the “price” value which is retrieved from the database in “Availability.java” to “display.jsp”.I have achieved it, but the problem is…. I also need to pass the “price” value from “display.jsp” to “seat.jsp”. When I tried, it returns null value for the price variable.

Availability.java

JavaScript

display.jsp

JavaScript

seat.jsp

JavaScript

How can I achieve this?

Kindly answer my question! Immediate response is appreciatable.

Thank you in advance:)

Advertisement

Answer

In display.jsp, in the href, you can have a servlet instead of another jsp page and that servlet can pass as a requestParameter the value you need, and you can perform a forward to your seat.jsp. You can, then, read the parameter that you need in your seat.jsp.

I hope that helps.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement