wood burning stoves 2.0*
The moose likes JSP and the fly likes faced error in jsp simple custom tag implemention Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "faced error in jsp simple custom tag implemention" Watch "faced error in jsp simple custom tag implemention" New topic

faced error in jsp simple custom tag implemention

pedababu murala

Joined: May 25, 2008
Posts: 1
please anybody could find why my application giving ServletException
The following are the source files

<form method="GET" action="http://localhost:8888/cust5/druginfo.do">
<table border="1" align="center">
<td><select id="drugs" multiple size="7" style="width: 100;">
<option value="B4112">B4112</option>
<option value="OMEZ">OMEZ</option>
<option value="BCOMPLEX">BCOMPLEX</option>
<option value="AVIL">AVIL</option>
<option value="COLDACT">COLDACT</option>
<td><input type="submit" name="submit" value="submit"></td>

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"



<?xml version="1.0" encoding="ISO-8859-1" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd" version="2.0">

Thomson custom tags
This is a dummy tag solely to satisfy DTD requirements


import java.io.IOException;
import java.rmi.ServerException;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HandlerServlet extends HttpServlet {
public void doGet(HttpServletRequest req,HttpServletResponse res)throws IOException,ServerException{
String drugs[]=req.getParameterValues("drugs");
req.setAttribute("durgs", drugs);
RequestDispatcher rd=req.getRequestDispatcher("/result.jsp");
}catch(Exception e)


import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

public class SimpleTagTest5 extends SimpleTagSupport{

private String[] drugList;

public void setDrugList(String[] drugList) {
this.drugList = drugList;
public void doTag()throws IOException,JspException{

for(String drug rugList){


<%@ taglib uri="http://thomson.pdi/tags" prefix="s"%>
<table border="2">
<caption>Drugs Information</caption>
<s rugsinfo drugList="${durgs}">
</s rugsinfo>

Pedababu .M
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60774

Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along. Please read this for more information.

You can go back and change your post to add code tags by clicking the .

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: faced error in jsp simple custom tag implemention
Similar Threads
cannot find the declaration of element taglib
Classic tags. browser is not responding.
problem with tld file
unable to initialize a list from custom simple tag handler
Custom tags Problem