anirudha mundada
anirudha mundada

Reputation: 596

how to add two variables to URL in JSP?

I want to add two variables to URL in JSP

<a href="buyOrSell.do?symbol=<%=trade.getSymbol()%>&mktPrice="<%=trade.getCurrentMktPrice()%>>Buy</a>

ex - http://loclhost:8080/myProj/buyOrSell.do?symbol=anySymbol&mktPrice=price

but I am not able to get second variable.

Upvotes: 2

Views: 4091

Answers (1)

Mattias Hagstr&#246;m
Mattias Hagstr&#246;m

Reputation: 211

Seems like you had a quote mark placed wrong in your code. Test the line below instead

<a href="buyOrSell.do?symbol=<%=trade.getSymbol()%>&mktPrice=<%=trade.getCurrentMktPrice()%>">Buy</a>

Upvotes: 3

Related Questions