Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No tag library could be found with this URI

 
Indu Sekhar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I am using JSF for my project and I am still getting familiar with it. Meanwhile I am getting the following error in one of the examples [I am trying.
I have searched for solutions in google but surprisingly there were only questions but no answers.
I would really appreciate if someone takes time and shares the solution so not only me but many others would benefit from it.
Environment details:
Version: 3.4.2
Server: BEA Weblogic Server v10.0
Java version : JDK150_11
Maven : 2.0.7



Here is the Error:

javax.faces.FacesException: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /pages/inputname.jsp
inputname.jsp:3:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
^----^

at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:432)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:255)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:146)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:147)
Truncated. see log file for complete stacktrace
javax.servlet.ServletException: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /pages/inputname.jsp

These are the following Jars I am using:

myFaces-api-1.1.7.jar
jstl-1.2.jar
myfaces-impl-1.1.7.jar
servlet-api-2.4.jar
and some commons...*.jar...

I have tried few combinations of the version of the above jars too.
I am not using a weblogic.xml file.


The web.xml file is:

?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" id="WebApp_ID">


<display-name>
evalAlgorithm</display-name>

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>
<listener>
<listener-class>
org.apache.myfaces.webapp.StartupServletContextListener
</listener-class>
</listener>

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>


I sincerely appreciate someone sharing their expertise on this.

Thanks,
Indu.

 
Tim Holloway
Saloon Keeper
Posts: 18359
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Indu. Your posting was colorful, but we have a "code" button on the editor that will wrap tags around your code samples and keep them from getting reformatted.

The URI in question should have been resolved in the faces-api.jar. I don't think the MyFaces-api.jar is the same thing, since the JSF faces-api is part of the Sun specs, not a per-vendor thing. So you may need to add that jar to your WAR's WEB-INF/lib collection.
 
Indu Sekhar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim,
Thank you for the response.
I will keep the code button in mind for the new posts I would be doing.

You solution made me think and try few things.
Meanwhile I copied a sample project from my friend and it works great. The sample project is using the myfaces-api.jar and myfaces-impl.jar
I see everything is same with respect to my project and sample project and am I still getting the error. So I am not sure why mine isn't working. I have pretty much all the jars he is having...

Thanks,
Indu.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic