• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem using taglib with Tomcat4.0...

 
Manasvi Chowdary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!
I am using Jakarta-dbtags lib for accessing database from client side (jsp). It works fine with Tomcat3.0.4, but when I use the same thing in Tomcat4.0 it's falling over.
The error reads -
javax.servlet.ServletException: (class: org/apache/jsp/log$jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse V) Incompatible object argument for function call
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:481)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
...............
...............
java.lang.VerifyError: (class: org/apache/jsp/log$jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse V) Incompatible object argument for function call at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.load(JspServlet.java:138) .............
..........................
..................................

I don't understand why it's happening as the only thing I did was to move from Tomcat3.0.4 to Tomcat4.0.
In web.xml, within <webapp> tag- I had the <taglib> property & value tag as the last one.
Any ideas what I am missing or where I am going wrong?? For me - It looks like to do with some conflict of jar files in Tomcat or so, but no exact idea
Any help would be greatly appreciated.Thanks.

regards,
Manasvi
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat 4 does use a different servlet API from Tomcat 3. Have the taglib classes been recompiled using the newer API jar files?
Bill
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Manasvi",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Thanks.
Dave
 
Manasvi Chowdary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by William Brogden:
Tomcat 4 does use a different servlet API from Tomcat 3. Have the taglib classes been recompiled using the newer API jar files?
Bill

I am bit confused here...
What I did is compiling the taglib classes along with my other application source files and then packaged taglib classes in jar file. But in this whole process I used only the jar files necessary for the application and nothing like servlet.jar.
I though servlet.jar is used by tomcat during runtime and nothing to do with the application. Can U please tell me if I am mis-understanding the whole concept.
And how should I recompile taglib classes using the servlet API jar files??
Any input would be of great help to me.
Thanks very much
Manasvi
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Taglibs require the javax.servlet.jsp.tagext package, which changed between JSP 1.1 and JSP 1.2 - Tomcat 3 uses the early version and Tomcat 4 uses the most recent.
You don't say what your compiling environment is, but somewhere in there is a servlet.jar having that package in it. You will have to compile with a servlet.jar corresponding to the Tomcat version in order to avoid this problem.
You should download the servlet and JSP API documentation from java.sun.com and keep it handy!
Bill
 
Manasvi Chowdary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bill!
Thanks very much for UR reply. I was using TogetherSoft6.0 which was using old API (JSP 1.1).
I will recompile the classes with servletAPI 1.2 - hope it would sort out the error
and I will let U know how it goes. Thanks once again for UR tip.
reagrds,
Manasvi
 
Manasvi Chowdary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there!
I am lost all over again (but atleast I could make dbtaglib work)
I recompiled the taglib and when I did a test on it by making a small web app with couple of jsp pages, the taglib worked perfectly well (Hurraaahh!!). But when I placed the jar & tld in the actual web-application I was working on - it started falling over at the same point with same error (panic!! ). I made sure that I am using new jar file. Both of the applications are using same environment - Tomcat4.04. Any ideas with what it could be conflicting?? Any help would be greatly appreciated.
regards,
Manasvi
 
Manasvi Chowdary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now, I have moved bit further and found out the cause for getting the above mentioned error -
The dbtag lib seems to be conflicting with another taglib (local taglib written for our web-application purpose only).
When I remove that particular taglib it works fine. But I don't know the cause for conflict yet. I don't see any classes with same name or so.....
Any ideas on this???
[ August 16, 2002: Message edited by: Manasvi Chowdary ]
 
Manasvi Chowdary
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works fine now.
Thanks for UR replies.
regards,
Madhavi
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!