I have to create custom tags to complete my project without using any IDE on ubuntu(Linux) but I'm repeteadly getting an error message.
To create custom tag I've made two files tagfileone.tag and tagfileonetest.jsp and their locations are as: for tagfileonetest.jsp: /var/lib/tomcat8/webapps/ROOT/Trying_Tag for tagfileone.tag: /var/lib/tomcat8/webapps/ROOT/Trying_Tag/WEB-INF/tag
here Trying_Tag is the name of directory where my web application is.
But I repeteadly get an error on browser while running which says:
Trying_Tag/tagfileonetest.jsp (line: 13, column: 28) No tag "tagfileone" defined in tag library imported with prefix "tf"
I'm adding snapshots for more clearance. If someone can help I'll be really grateful.......
Under the default Ubuntu configuration Tomcat automatically deploys all directories in
/var/lib/tomcat8/webapps. You didn't deploy an applicationTrying_Tag, but only an applicationROOTwith a folderTrying_Tag. Therefore your JSP is looking in the folder/var/lib/tomcat8/webapps/ROOT/WEB-INF/tagsfor the tag files and does not find any.Move the
Trying_Tagfolder to/var/lib/tomcat8/webappsand everything should work fine.Remark: the URLs will remain the same, because a web application called
ROOThas an empty context path, soROOT/foo/bar.jspwill be accessible with an empty context path and/foo/bar.jspas path info (the concatenation is/foo/bar.jsp), whilefoo/bar.jspwill have a context path of/fooand a path info/bar.jsp, which results in the same URL.