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.
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>
精彩评论