File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes why these exception please see Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic

why these exception please see

Arun Maalik
Ranch Hand

Joined: Oct 25, 2005
Posts: 216
Dear sir when i am accessing my jsp file then i am getting thes exception that

org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/connect.tld: (line 4, col 23)

coding of all 3 file that is tag handler,tld file and jsp file are well if you want to see the coding then coding are as below

[code ]//for jsp file

<%@ taglib uri="/connect.tld" prefix="chrt" %>

<chrt:connect />

[code]//for tld file


[code] //for tag class
package harbanse;
import java.sql.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class connect extends TagSupport implements Serializable{
String st1,st2,name,pass1,pass2;
public void setSt1(String st1){
this.st1=st1; }

public void setSt2(String st2){

public void setName(String name){; }

public void setPassword1(String pass1){
this.pass1=pass1; }

public void setPassword2(String pass2){
this.pass2=pass2; }

public int doStartTag(){
JspWriter out=pageContext.getOut(); String st="insert into user_login (user_id,user_password) values (name,pass1);";
Connection con=DriverManager.getConnection ( "Jdbc dbc:MyDataSource","scott","tiger"); Statement stmt=con.createStatement();
int n=stmt.executeUpdate(st);
catch(Exception e){}
return SKIP_BODY;


and at the time of deployment i have give in file refrence for tag as below

/connect.tld /web-inf/connect.tld

sir here i would like to know that why above exception
is server not serching tld file?
server reached at tld file but not reaching to harbanse.connect?

what problem sir

with regard

Arun kumar maalik
Nikhil Jain
Ranch Hand

Joined: May 15, 2005
Posts: 389
1. Are you sure that <jsp-version> is valid tag in tld. I am not sure, I have never used it..

2. replace the <taglib> element in your told with the following ...
<taglib xmlns=""

SCJP 1.4, SCWCD 1.4, SCBCD 1.5, TOGAF 9, Comptia Cloud+
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63838

Do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: why these exception please see
It's not a secret anymore!