Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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: 66783
168
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...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!