关于在tomcat6配置cas问题

org.apache.jasper.JasperException: /WEB-INF/view/jsp/default/ui/casLoginView.jsp(48,35) Attribute value request.getQueryString() == null ? "" : request.getQueryString().replaceAll("&locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]|^locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]", "") is quoted with " which must be escaped when used within the value   
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)   
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)   
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)   
    org.apache.jasper.compiler.Parser.parseQuoted(Parser.java:301)   
    org.apache.jasper.compiler.Parser.parseAttributeValue(Parser.java:250)   
    org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:212)   
    org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:155)   
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1252)   
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1467)   
    org.apache.jasper.compiler.Parser.parseBody(Parser.java:1675)   
    org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1022)   
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1290)   
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1467)   
    org.apache.jasper.compiler.Parser.parse(Parser.java:138)   
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)   
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)   
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)   
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)   
    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)   
    org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:171)   
    org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:251)   
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1160)   
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:901)   
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)   
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)   
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:431)   
    javax.servlet.http.HttpServlet.service(HttpServlet.java:617)   
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)   
    org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServlet.java:115)   
    org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(ClientInfoThreadLocalFilter.java:48)   
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75) 


解决办法:
修改casLoginView.jsp文件,将48行value属性中所有的双引号前面加\解决。
<c:set var="query" value="<%=request.getQueryString() == null ? \"\" : request.getQueryString().replaceAll(\"&locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]|^locale=([A-Za-z][A-Za-z]_)?[A-Za-z][A-Za-z]\", \"\")%>" />

你可能感兴趣的:(java,apache,Web,jsp,servlet)