创建jsp文件时出错 [英] Error in creating jsp file

查看:120
本文介绍了创建jsp文件时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> 

我正在eclipse中创建jsp文件,它在指令中显示错误 它不接受我上面提到的uri.

解决方案

来自您使用的问题

Struts标记库自动配置

这是应该怎么做

Struts标签库配置自动和手动

这是简单的方法,仅在Struts 1.2、1.3和Servlet 2.3/2.4容器中使用.您不再需要在web.xml中定义"tlds"详细信息,只需在项目类路径中包含struts-taglib.jar或将其复制到WEB-INF/lib文件夹即可.

所有"tld"详细信息都在"struts-taglib.jar \ META-INF \ tld"文件夹中定义.在部署期间,struts-bean.tld,struts-html.tld,struts-logic.tld和struts-tiles.tld将自动部署.但是,您只能通过以下"pre-fixed uri"名称访问它.在这种方法中,不允许更改"taglib uri"名称.

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

<%@taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
<%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> 

I'm creating jsp file in eclipse it shows error in directive it does not accept the uri which I mentioned above.

解决方案

from your question you used

Struts Tag Libraries Automatic Configuration

this is how it should be done

Struts Tag Libraries Configuration automatic and manual

This is the easy way, and used in Struts version 1.2, 1.3 and Servlet 2.3/2.4 container only. You do not need to define the "tlds" details in web.xml anymore, just include the struts-taglib.jar in your project classpath or copy it to WEB-INF/lib folder.

All the "tld" details are define inside the "struts-taglib.jar\META-INF\tld" folder. During deployment, the struts-bean.tld, struts-html.tld, struts-logic.tld and struts-tiles.tld will deploy automatically. However, you can access it via the following "pre-fixed uri" name only. In this method, you are not allow to change the "taglib uri" name.

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>

这篇关于创建jsp文件时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆