• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to call dynamic value in <a href="">

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My index.jsp file

<html>
<body>
   <h2>Jersey RESTful Web Application!</h2>
   <p><a href="webapi/hello">Welcome to Jersey resource</a><br>
<input type="text" style="background:black; color:#FFFFFF; name="Year" placeholder="Please Insert Year of Birth"><br>
<input type="text" style="background:black; color:#FFFFFF; name="Month" placeholder="Please Insert Month of Birth"><br>
<input type="text" style="background:black; color:#FFFFFF; name="Day" placeholder="Please Insert Day in number">
   <p>Visit <a href="http://jersey.java.net">Project Jersey website</a>
   
   for more information on Jersey!
   <%
    String year = request.getParameter("Year");
    String month = request.getParameter("Month");
    String day = request.getParameter("Day");
   %>
</body>
</html>
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As with any modern JSP, you insert dynamic values using the EL (Expression Language) along with the JSTL (JSP Standard Tag Library).

See this article for an explanation of how JSP operates.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The use of scriptlets (the Java code delimited via <% and %>) is obsolete and should not be used.

Welcome to the Ranch.
 
I didn't say it. I'm just telling you what this tiny ad said.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic