documentation broken??
Am I going crazy or does the documentation appear to be missing the ends of sentences everyone? I'm not talking about quality of documentation, I'm talking about data appearing to be lost. I redownloaded the zip today to make sure, and here a representative excerpt from server.xml.html rmi-config path="./rmi.xml" / Defines the relative/absolute path to a path - The path. jms-config path="./jms.xml" / Defines the relative/absolute path to a path - The path. -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development
orion adding entries to web.xml
In our setup we develop on tree that contains an expanded ear archive with expanded war files in it, then simply have orion running against these working directorys. This works great, each developer has their own copy of the tree, etc. etc. One annoying that is that it appears that orion is adding "com.evermind.servlet.http.JSPServlet" and "com.evermind.server.http.CGIServlet" entries to the web.xml file. We run other servers such as tomcat, etc. against the same tree and they of course break. Why is it touching these files at all? We have an orion-web.xml that contains them, isn't that where they should stay? -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development (512) 744-1012
updating to a specific version
Is it possible to tell autoupdate to get a particular version, rather than "the latest"? -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development (512) 744-1012
Re: sendRedirect in orion and jrun
I agree, here's how I solved the problem. I moved server specific functionality to a static method of my "ServletContainer" class, whose behavior is configurable at run-time via a properties file: # Set this to true if your servletContainer interprets the root of the # request URL as relative to docroot, rather than to context root # should be true for tomcat, false for orion (as of 7/17/00) # default is false sendRedirectUsesDocroot=false It then contains this method: /** * Redirect the client browser to the specified URL. * * Some servers do not handled relative paths the same. Some * make the request relative to docroot, others the context root. * This method is sensitive to the property * codesendRedirectUsesDocroot/code, which should be set to * true or false. * * @param req the request * @param res the response * @param href the url to redirect to (before any conversion) **/ static public void sendRedirect(HttpServletRequest req, HttpServletResponse res, String href) throws IOException { if (ServletContainer.sendRedirectUsesDocroot() href.startsWith("/")) href = req.getContextPath() + href; Debug.println("Redirecting to " + href); res.sendRedirect(href); } All my code (taglibs, servlets, etc) that needs this functionality defers it to this class. -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development (512) 744-1012 - Original Message - From: ""Christian Sell"" [EMAIL PROTECTED] Newsgroups: uo.listserv.orion Sent: Saturday, July 15, 2000 7:15 AM Subject: Re: sendRedirect in orion and jrun First let me start by saying that this is not a bug...nor a misinterpretation of the specs. the specs are so unclear on this one that it is hard to misinterpret them anyway. Magnus already conceded that the issue was officially still "up in the air". But I agree (as I said previously) that context-relative makes the most sense, for the very reasons that you cite. My current problem is how to write server-portable code (and deployment descriptors!) which in the case of sendRedirect leads me to having to use hard-coded absolute URLs, as you describe. Servlets 2.2 specification introduces the concept of "web-app" contexts. well, I guess that is not news anymore.. ;-) String requestURL=HttpUtils.getRequestURL(request).toString(); String absolute=requestURL.substring(0, requestURL.length()-request.getRequestURI().length()); response.sendRedirect(absolute+"/myothercontext/index.jsp"); thanks. I was just going to roll up my sleeves to write that one. Funny though that I have to do this to redirect into my own context (due to server incompatibility, not orions fault).
Re: sendRedirect in orion and jrun
I'm struggling with this too. Tomat does what JRun does, interprets relative URLs as arelative to the root rather than the the context. I think Orion's implementation makes more sense, but the spec is unclear. It simply says that relative URLs must be translated to abosolute URLs, that's all. If Tomcat is the reference implementation, then by definition it is "right", even if it's wrong. That being said, unless Tomcat changes itself, shouldn't Orion follow suite?. -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development - Original Message - From: ""Jen Hsien Huang"" [EMAIL PROTECTED] Newsgroups: uo.listserv.orion Sent: Friday, July 14, 2000 10:33 AM Subject: RE: sendRedirect in orion and jrun Of cause, since API says server will resolve relative, so Orion is right. -Original Message- From: [EMAIL PROTECTED] [mailto:owner-]On Behalf Of Christian Sell Sent: Friday, July 14, 2000 7:43 PM To: Orion-Interest Subject: sendRedirect in orion and jrun from within a servlet, i am making the following call: response.sendRedirect("/"); interesting thing: in orion, this takes me back to the context root of the web application. In JRun 3.0, it takes me to the root of the web server. As far as I can see, the API docs say that the server will resolve relative URLs, but which one is right in this case? Christian Sell
Re: sendRedirect in orion and jrun
Yes, but the SPEC says "It is legal to call this method [sendRedirect] with a relative URL path, however the underlying container must translate the relative path to a fully qualified URL for transmission back from the client." Which is unfortunately unclear. I'm ready to vote this one "tomcat bug" however, given the corroborating evidence from the API documentation. -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development (512) 744-1012 - Original Message - From: "Christian Sell" [EMAIL PROTECTED] To: "Duane Fields" [EMAIL PROTECTED]; "Orion-Interest" [EMAIL PROTECTED] Sent: Friday, July 14, 2000 12:49 PM Subject: Re: sendRedirect in orion and jrun oh my. I did not look into tomcat for this one, although I normally do use it as a test platform (its these 3 for now). Tomcat sure adds another dimension. Apart from that, I was going to agree that context-relative makes more sense (however it means that you can get to the server root only with an absolute URL). The following is from the API docs for ServletContext.getResource(): "Returns a URL to the resource that is mapped to a specified path. The path must begin with a "/" and is interpreted as relative to the current context root. " it would be nice to get a statement from orion dev on this (as always) -Original Message- From: Duane Fields [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Date: Samstag, 15. Juli 2000 01:18 Subject: Re: sendRedirect in orion and jrun I'm struggling with this too. Tomat does what JRun does, interprets relative URLs as arelative to the root rather than the the context. I think Orion's implementation makes more sense, but the spec is unclear. It simply says that relative URLs must be translated to abosolute URLs, that's all. If Tomcat is the reference implementation, then by definition it is "right", even if it's wrong. That being said, unless Tomcat changes itself, shouldn't Orion follow suite?. -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development - Original Message - From: ""Jen Hsien Huang"" [EMAIL PROTECTED] Newsgroups: uo.listserv.orion Sent: Friday, July 14, 2000 10:33 AM Subject: RE: sendRedirect in orion and jrun Of cause, since API says server will resolve relative, so Orion is right. -Original Message- From: [EMAIL PROTECTED] [mailto:owner-]On Behalf Of Christian Sell Sent: Friday, July 14, 2000 7:43 PM To: Orion-Interest Subject: sendRedirect in orion and jrun from within a servlet, i am making the following call: response.sendRedirect("/"); interesting thing: in orion, this takes me back to the context root of the web application. In JRun 3.0, it takes me to the root of the web server. As far as I can see, the API docs say that the server will resolve relative URLs, but which one is right in this case? Christian Sell
jsp:include and params?
in 1.1.21 and 1.1.19 I can't seem to get params to be passed to jsp:include'd pages? For example: jsp:include page="mypage.jsp" flush="true" param name="title" value="some title"/ /jsp:include in mypage.jsp, %= request.getParameter("title") % returns null -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development (512) 744-1012
deployment tools for working with expanded WAR and EARs
The deployment tools (earassembler and webappassembler) are pretty cool, but they seem to only edit/save archived EAR and WAR files. I generally have a source tree which has an expanded archive (reflected into Orion) and I'd luck to run the deployment tools to edit my application.xml and web.xml files. Is this possible? It seems to want a *.war or *.ear file, and saves the same back out. The "export/import" options seem to have some promise but I haven't been able to make them work. -- Duane Fields [EMAIL PROTECTED] Managing Engineer, Web Development (512) 744-1012