This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tag libraries  RSS feed

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
I am doing taglibraries example in rad..
<%@ taglib uri="META_INF/session.tld" prefix= "sessionData" %>
my questions are
1. At this line I am getting error session.tld unknown..
Do i need to do any pre steps in application server.. if so please let me know where do I need to keep .TLD's.
2. How can we provide the body for those .TLD's.
Thanks
 
Author and ninkuma
Marshal
Posts: 66608
161
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. you should not be using a file path for the TLD URI. Rather, define a URI within the TLD and use that. Then place the .tld file anywhere under WEB-INF and the container will automatically find it.

2. What do you mean by "body"?
 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for you info..
"session.TLD" how can we define this as a notepad and save it as TLD...
give the functionality in side that notepad..
that's my question about my body..
please give me reply asap
 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my code..
<%@ taglib uri="session.tld" prefix= "sessionData" %>
<sessionData:list>
<TR><TD ALIGN="center" WIDTH="33%"><%= name %></TD>
<TR><TD ALIGN="center" WIDTH="33%"><%=value %></TD>
</sessionData:list>
I am getting an error where name value are not defined..
my doubt is where do i need to define them in the taglibrary.
 
Ar Reddy
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib uri="session.tld" prefix= "sessionData" %>
<%
String action = request.getParameter("action");
if((action!= null ) && (action.equals("Add Item")))
{
String itemName = request.getParameter("txtItem");
String itemAmount = request.getParameter("txtAmount");
session.setAttribute(itemName,itemAmount);

}
else if((action != null)&&(action.equals("delete")))
{
String deletedItem = request.getParameter("deletedItem");
session.removeAttribute(deletedItem);
}
%>
<sessionData:list>
<TR><TD ALIGN="center" WIDTH="33%"><%= name%></TD>
<TR><TD ALIGN="center" WIDTH="33%"><%=value %></TD>
<%String partLink="http://localhost:9081/CyberExportStore/shoppingCart.jsp";
String deletLink = partLink+"?action=delett&deletedItem="+name;
%>
<A HREF="<%=deletLink%>">delete</A></TR> %>
</sessionData:list>



how can we get name an values please respond
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<TR><TD ALIGN="center" WIDTH="33%"><%= name%></TD>
<TR><TD ALIGN="center" WIDTH="33%"><%=value %></TD>



the variables "name" and "value" are nowhere to be found... the values are not delcare at all... you dont declare those in TLD's but in your JSP's...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!