Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why these exception?

 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear sir i am using sunmicrosystem deploye tool. I am making a tag for jdbc but when i am calling the jsp i am getting following type of exception as. i want to know here that why i am getting these types of exception?In which situation these types of exception may occure.


org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/connect.tld: (line 4, col 23)
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:252)
org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:223)
org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:480)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:422)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:488)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1544)
org.apache.jasper.compiler.Parser.parse(Parser.java:131)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:214)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:500)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:481)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:469)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:516)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:307)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247)
javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)

with regard

Arun kumar maalik
[ September 01, 2006: Message edited by: Bear Bibeault ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/connect.tld: (line 4, col 23)


The file connect.tld is not well formed.
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry sir but the 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

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

<chrt:connect />
</body>
</html>
[/code]
------------------------------------------------------------------------


----------------------------------------------------------------------



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
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is your problem.
<short-name>connect</connect>


it needs to be
<short-name>connect</short-name>


pay close attention to the error messages - it tells you exactly what was wrong.

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

ie., Line number 4, column number 23 in connect.tld has a problem.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please stop posting the same question in different threads, and ignoring those answering you. Thank you.

http://www.coderanch.com/t/172927/java-Web-Component-SCWCD/certification/which-we-these-exception
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.

I have closed the redundant posts.
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

String st="insert into user_login (user_id,user_password) values (name,pass1);";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("Jdbc:Odbc:MyDataSource","scott","tiger");
Statement stmt=con.createStatement();
int n=stmt.executeUpdate(st);

Guys,

Correct me if I am wrong. My understanding is that custom tags (or actions) should be used only for display logic (like printing out a menu / header / footer notes etc). For the same reason, I wasn't really a fan of the JSTL SQL Tag Library. Putting SQL logic in JSP defeats the whole purpose of MVC, in my humble opinion.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I also think that JSTL's sql support is evil
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65223
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, even the JSTL specification essentailly says that the SQL tags should only be used for protoyping and not production code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic