我致力于在我的网站上实施搜索。我只是将搜索关键字传递给java。 url正在java格式化和构建。如果我用单词说“金融”,我的东西工作正常。
但如果我的搜索关键字中有空格,请参阅 “财务估计”然后它的投掷错误。我正在使用表单/ GET方法发送搜索关键字。
我应该如何取出空间并看起来像一个单词
这是错误
javax.servlet.ServletException
at com.ford.fc.atd.servlet.AbstractFrontController.doPost(AbstractFrontController.java:72)
at com.ford.fc.atd.servlet.AbstractFrontController.doGet(AbstractFrontController.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.ford.fc.atd.servlet.filter.AbstractFilter.invokeNextFilter(AbstractFilter.java:65)
at com.ford.fc.atd.servlet.filter.AbstractFilter.doFilter(AbstractFilter.java:43)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.ford.fc.atd.servlet.filter.XSSParameterEncodingFilter.doFilter(XSSParameterEncodingFilter.java:79)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3393)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2140)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2046)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)