Bookmark Topic Watch Topic
  • New Topic

JSP : PARAMS action

 
Jaggi Kunal
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Report post to moderator
I want to retrieve Parameters in a JSP page which are set by another JSP page.
Following are the two code snippets :
<%-- Param1.jsp --%>
<HTML>
<HEAD><HEAD>
<BODY>
<jsp arams>
<jsp aram name="name" value="Yash" />
<jsp aram name="age" value="23" />
<jsp aram name="eyes" value="black" />
</jsp arams>
<A HREF="/Param2.jsp">Click Here</A>
</BODY>
</HTML>
<%-- Param2.jsp --%>
<HTML>
<HEAD><HEAD>
<BODY>
<%
out.println("<b>"+request.getParameter("name")+"</b>");
out.println("<b>"+request.getParameter("age")+"</b>");
out.println("<b>"+request.getParameter("eyes")+"</b>");
%>
</BODY>
</HTML>
I am getting a compilation error when I access Param1.jsp using http://localhost:8080/Para1.jsp. I am using Tomcat 4.1.12.

Regards,
Kunal Jaggi
SCJP
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question in multiple forums - it wastes time if people answer in one forum without realizing it's already been answered elsewhere. Followups can go here. Thanks.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!