Author
jsp:param usage
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Mar 29, 2005 22:11:00
0
Generally we use <jsp:include> like this Is there is any other way so that I don't have to use scriptlets in header.jsp. Is there is some struts or JSTL tag that can be used to get the request parameter. Is there is any expression language alternative? Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56202
${param.name}
[Smart Questions ] [JSP FAQ ] [Books by Bear ] [Bear's FrontMan ] [About Bear ]
Poobhathy Kannan
Ranch Hand
Joined: May 26, 2004
Posts: 94
you can try Jakarta's request taglibrary Have a look here >>
http://learnertobeginner.blogspot.com/
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Mar 30, 2005 20:17:00
0
header.jsp
-----------
<%
String name = request.getParameter("name");
if(name.equals("sanat")){
%>
Welcome
<% } %>
Is there is any struts alternative. Can anyone show me what's best way to write this code, so that it man minimize use of scriptlets. Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56202
Did you read my earlier response?
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Mar 30, 2005 21:43:00
0
Hi Can I use this
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56202
How does that "minimize use of scriptlets"? And, why use proprietary tags when standardized tags are available? [ March 30, 2005: Message edited by: Bear Bibeault ]
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Mar 30, 2005 21:49:00
0
This one is working. Thanks All.
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Mar 30, 2005 21:52:00
0
Originally posted by sanat kumar padhy:
Is the usage is correct? What about other attributes like parameter, property. Where to use these attributes? Thanks in advance.
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Mar 30, 2005 22:05:00
0
Originally posted by sanat kumar padhy: This one is working. Thanks All.
Sorry this is not working. Can anyone provide the proper usage? Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56202
I already gave you a working example.
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
How about:
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Mar 31, 2005 05:04:00
0
Originally posted by Ben Souther:
How about:
It won't work. Can I get code for struts alternative? Thanks.
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
Originally posted by sanat kumar padhy: It won't work.
"It won't work" doesn't tell us much. Are you getting an error message? Have you tried printing the value of the param to the page to see what is really getting there?
Originally posted by sanat kumar padhy: Can I get code for struts alternative?
Maybe, in the Struts forum.
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56202
Movde to the Struts forum since only a Struts solution seems acceptable.
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Apr 01, 2005 04:19:00
0
Originally posted by sanat kumar padhy: Generally we use <jsp:include> like this
Hi all, Can I get a struts solution for this. Thanks in advance.
Anil Sadi
Greenhorn
Joined: Jan 09, 2001
Posts: 23
Hi sanat, try the following struts solution: I hope it helps !!! Anil Sadineni. [ April 01, 2005: Message edited by: Anil Sadi ]
sanat
Ranch Hand
Joined: Dec 08, 2004
Posts: 111
posted Apr 03, 2005 22:07:00
0
Thanks Anil, That code works.
subject: jsp:param usage