• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

Problem in jsp using custom tag

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all! I started to use custom tags in the jsp. I am using weblogic5.1. I saved the jsp file in the public_html & the .tld file in the WEB-INF folder.. & the tag handler class in the servletclasses directory. The prob. is that the container is recognising the .tld file as valid tag library descriptor file & generating the servlet out of jsp, but while instantiating the tag bean its giving error. I don't know how it is not finding the tag class file in the servletclasses directory. I am not using package for tag, so i have saved the class file directly under the specified directory. Could any body help me to solve the problem. If nedded the code i can give, even the servlet class generated in the classfiles directory. Would any body tell me how to see the whole error message in the sever console.
 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check under myserver directory, which i suppose is the root. there is a file weblogic.txt, that will have all the error messages.
and if you post the code, it would be easier to help you.
 
ajay gaur
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx for considering the message. My problem was solved but i noticed a very strange thing.
I didn,t make a package for the tag handler class. But after making package for same class & making apprpriate directories, it worked. I feel it very strange that a tag class in the servletclasses folder in weblogic5.1 don't work, but same class after making package works.
My problem is solved but i want to know reason behind this.
Please clarify.
Please also tell how to work with connection, statement or resultset in the custom tags which i opened in the jsp. Is it through pageContext.getAttribute() or by setting the attribute for the tag . I know that they are not serializble, but i was to use these in my tag that was opened before. Is setting attribute for tag needs objects to be serialized, they are passed as string, how to get connection from that string.
Please tell me the method to be used for it.
Thanx in advance.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For anything more complex than a String or primitive, I think you should either attach it to the session object in the JSP and use the getSession method in PageContext, or use setAttribute in the JSP and getAttribute in the tag.
Bill
 
ajay gaur
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cynthia,
Ya public_html is my root directory. But I didn,t find any weblogic.txt file there. Tell me when & how it is created.
Ajay
 
ajay gaur
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi William,
Can we place the connections, statements or resultsets in the session or pagecontext.
Ajay
 
Cynthia Yao
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my fault, the actual file name is weblogic.log. check under your weblogic.properties file under the weblogic folder,
weblogic.system.maxLogFileSize=1024 for the max size of this file.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic