关于:

roger666888 2008-07-26 12:19:24
<%@ taglib prefix="myfun" uri="http://hellking.com/function"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ page contentType="text/html; charset=gb2312" language="java" %>
<%@ page isELIgnored ="false" %>
<html>
<head>
<title>表达式语言的使用</title>
</head>
<body bgcolor="#FFFFFF">
<hr>提交的内容是:
${myfun:trans(param.name)}

<hr>
<form action="function.jsp" method=get name=form1>
<input type=text name="name">
<input type=submit value=提交>
</form>
<hr>
<hr>
另一个函数的使用,结果是:
${myfun:add(param["x"],param["y"])}
<form action="function.jsp" method=get name=form2>
<input type=text name="x">
<input type=text name="y">
<input type=submit value=提交>
</form>

</body>
</html>


function函数如下:
package com.jspdev.ch16;
import java.io.*;
public class Function
{
public static String trans(String chi)
{
String result = null;
byte temp [];
try
{
temp=chi.getBytes("iso-8859-1");
result = new String(temp);
}
catch(UnsupportedEncodingException e)
{
System.out.println (e.toString());
}
return result;
}
public static int add(int x,int y)
{
return x+y;
}
}



在第一行下面有如下错误提示:Cannot find the tag librar descriptor for http://hellking.com/function。请问高人们怎么解决?谢谢!
...全文
143 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧