- This topic has 10 replies, 5 voices, and was last updated 18 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
bhavanasiraghuMemberStarting I added Struts capabilities using Struts 1.2 libraries. that time i got these Exception:
[ServletException in:/jsp/index.jsp] The absolute uri: http://struts.apache.org/tags-bean cannot be resolved in either web.xml or the jar files deployed with this application’
then I change my taglib URIs to:
http://struts.apache.org/tags-bean
still I got the same Exception……….
what can I do
Plz Help me
Thanks & Regards
Raghu.B
e-mail: raghava.bhavanasi@gmail.com
Riyad KallaMemberCan you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.
HanszMemberI’m not sure if this is a resolved issue or not, but I have/had the same problem… Just following the tutorial ‘First steps in Struts using eclipse + MyEclipse” … I created the index.jsp’s as instructed… no problems when creating them with the Struts 1.1 libraries, but the same error message as described above when creating them with the Struts 1.2 library support.
Could this be a version issue maybe for the struts libraries that are installed/copied when adding struts support to a web-project?
Riyad KallaMemberHansz,
Your error message is most likely due to the fact that you added Struts 1.2 capabilities, then when you went to create the struts page, you used the Struts 1.1 templates that have their URIs in the form: http://jakarta.apache.org/struts/… instead of http://struts.apache.org/…
HanszMemberI stand corrected 😀
btw… that was a scaringly quick response, especially for a sunday night … thnx for that.
Riyad KallaMemberNo worries, we realize the templating system should be smarter and tie it’s choices into your project capabilities. After I did this twice while testing other people’s bugs, thinking I had found new ones, I burned this scenario into my memory.
robbie@realise.comMemberI’m running Tomcat 4 and just ran into this issue.
The solution I used was to put this in web.xml:
<taglib>
<taglib-uri>http://jakarta.apache.org/struts/tags-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/struts/tags-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>And also to change this:
<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app xmlns=”http://java.sun.com/xml/ns/j2ee” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”>To this:
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”>
<web-app>Robbie
Riyad KallaMemberRobbie,
Your taglib solution is a good one (mapping to a common URI) but your solution of changing the web.xml file means you changed the version of your app from J2EE 1.4 spec to 1.3 spec, be sure to let MyEclipse know you did that too by going to your navigator view and opening the .mymetadata file and changing the J2EE version from 1.4 to 1.3.
robbie@realise.comMemberRiyad –
OK, thanks for that.
Robbie
alliance205Member@robbie@realise.com wrote:
<taglib>
<taglib-uri>http://jakarta.apache.org/struts/tags-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/struts/tags-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>can you tell me why my eclipse does not recognize the <taglib> tag?
whenever i add it to my web.xml, it says ” unknown element “taglib” ‘ … pls advise.. 🙁
Riyad KallaMemberBecause with the new web 2.4 spec, you need to wrap your taglibs in jsp-config tags.
-
AuthorPosts