English 中文(简体)
要求寄至JspServlet的无休止休息室,网址是:
原标题:Endless loop with request dispatched to JspServlet on WebLogic 11g

我有以下组合:

ServletA (in my case Apache CXFserlet - but this is not important), which is matching all requests - /*. ServletB, which is doing dispatch to a named servlet - "jsp" if it is available or "JspServlet" otherwise.

<>ServletA被编成,以便转交ServletB所有共同提交申请。 这是完美的。

另一方面,ServletB正在向“org.apache.jasper.servlet.JSPServlet”发送申请,如果该申请在Tomcat或“weblogic.servlet.JSPServlet”上运行,如果I m使用Oracle Weblogic的话。

在Tomcat公司,一切工作都是完美的。

On Weblogic, I have the following problem: ServletA is forwarding to ServletB it forwards to weblogic.servlet.JSPServlet. The JSPServlet is supposed to serve the JSP but it does not. Instead of this I get to an endless loop (ServletA -> ServletB -> JSPServlet -> ServletA -> ...)

是否有任何人的想法在<条码>网络学.servlet.JSPServlet内,并且有我如何利用网络为我的共同方案服务的想法? 欢迎所有意见和建议...... 我已经为这一问题投入了太多时间,没有任何成功。

NOTES:

  • Tested on Weblogic 10.3.5;
  • If ServletB forwards to dummy servlet no loop occurs;
  • Forwarding is done by using RequestDispatcher, retrieved by calling getNamedDispatcher("jsp") for Tomcat or getNamedDispatcher("JspServlet") for WebLogic.
问题回答

我认为,它的新版第2.5号小册在绘制URL地图时严格执行。

  • A servlet path string that contains only the / (forward slash) character indicates the default servlet of the application. The servlet path resolves to the request URI minus the context path; in this case, the path resolves to null.
  • A String that begins with an * (asterisk) specifies an extension mapping.

这些变化改变了行为方式,采用了以下HttpServletRequest方法:

  • getPathInfo
  • getServletPath

To better illustrate the change in behavior, consider the request /abc/def.html that resolves to ServletA:

  • If / maps to ServletA, then servletPath="abc/def.html" and pathInfo=null.
  • If /* maps to ServletA, then servletPath="" and pathInfo="abc/def.html".

To ensure that the path info returned is non-null, replace all occurrences of the / (forward slash) servlet mapping string with /*.





相关问题
Convert typed-in Text to lowercase

I ve got an index.jsp with [snip] <% String name = request.getParameter("name"); String pass = request.getParameter("pass"); String globalname = "webeng"; String globalpass = "2009"; ...

session transfer issue from Tomcat to ASP.Net

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other ...

Setting the default value in Struts2

I am setting the value(kind of default value) for a drop down select value from action class in a page(given below). When the page loads the value is beig displayed but the other elements of the ...

Evaluate dynamically constructed JSP at runtime

I have a requirement where in the JSP page itself is created by the user and stored in the database. When viewing results we need to render this JSP to the client, evaluating all tags inside this JSP. ...

How to Pack/Encrypt/Unpack/Decrypt a bunch of files in Java?

I m essentially trying to do the following on a Java/JSP-driven web site: User supplies a password Password is used to build a strongly-encrypted archive file (zip, or anything else) containing a ...

JSP exception - class not found (tomcat)

I m setting up an existing application on a new Tomcat 5.5 server connecting to a Postgres database (running on Debian Lenny). When I access it I get a series of stack traces with the following root ...

ArrayList to Table in JSP

I have an ArrayList and i am trying to display it in a table ..... ArrayList rows = .... ..... <table cellspacing="1" cellpadding="4" border="3"> <tr> <TH>...

热门标签