aspose file tools*
The moose likes Servlets and the fly likes Problem in jsp using custom tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem in jsp using custom tag" Watch "Problem in jsp using custom tag" New topic
Author

Problem in jsp using custom tag

ajay gaur
Greenhorn

Joined: Dec 04, 2000
Posts: 16
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.
Cynthia Yao
Ranch Hand

Joined: Nov 06, 2000
Posts: 92
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

Joined: Dec 04, 2000
Posts: 16
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.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12674
    
    5
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

Java Resources at www.wbrogden.com
ajay gaur
Greenhorn

Joined: Dec 04, 2000
Posts: 16
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

Joined: Dec 04, 2000
Posts: 16
Hi William,
Can we place the connections, statements or resultsets in the session or pagecontext.
Ajay
Cynthia Yao
Ranch Hand

Joined: Nov 06, 2000
Posts: 92
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in jsp using custom tag
 
Similar Threads
Use Weblogic to Run Custom JSP Tag -- Please Help!!!
Problem in jsp using custom tag
Exception while using attribute in tag file
taglib
Unable to import the java file into the JSP file.