求助 如题
package cn.study.dm;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class mailcheck
{
public mailcheck(){}
private static void matchingtext(String expression,String text)
{
Pattern p=Pattern.compile(expression);
Matcher m=p.matcher(text);
boolean b=m.matches();
System.out.println(b);
}}
bean文件如上
package cn.study.dm;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class mailcheck
{
public mailcheck(){}
private static void matchingtext(String expression,String text)
{
Pattern p=Pattern.compile(expression);
Matcher m=p.matcher(text);
boolean b=m.matches();
System.out.println(b);
}}
bean文件如上
解决方案 »
- 如何将调用Webservice返回的图片流存入oracle数据库字段Blob中
- 各位大侠。。web工程 能打成jar包吗??
- jsp计数问题!!!!!!急~!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 紧急求助 EJB3.0+Jboss
- 如何动态改变js的内容??
- O`Rrilly公司开发的Cos 有没有帮助文档啊
- 哪位哥哥帮俺一个忙啊,只是安装一个JSP论坛(在线结账)
- 数据库连接池怎么弄?自己写代码还是?
- 我新建的jsp文件的图标怎么和txt的是一样
- extjs3.3.1的柱状图如何在柱子顶端显示数据
- 怎么关掉X,Y轴的显示?_____事成+100
- 使用jdom如何为XML添加名称空间
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<jsp:useBean id="check" class="cn.study.dm.mailcheck" scope="page"/>
<body><%String text = new String();
text=request.getParameter("textfield4");
String expression = new String ();
expression ="^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$";
check.matchingtext(expression,text);
%>
</body>
</html>
jsp页面文件如上
The method matchingtext(String, String) from the type mailcheck is not visible
13: String expression = new String ();
14: expression ="^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$";
15:
16: check.matchingtext(expression,text);
17:
18:
19:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.报错 如上