Re: Hiding the .do part in the site address
On Friday 09 April 2004 21:33, Erez Efrati wrote: Already tried s/th like jsp:forward page=/main.do / in your index.jsp? :-) HTH, -- Chris. Hi, Like all Struts application I have the index.jsp redirecting the user client to my home.do struts action. Is it possible to get rid of the home.do in the address bar so at least in the site home page the site address will show a clean address of www.mysite.com http://www.mysite.com/ ? Thanks in advance, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hiding the .do part in the site address
On Friday 09 April 2004 21:56, Wendy Smoak wrote: From: Christian Bollmeyer [mailto:[EMAIL PROTECTED] Already tried s/th like jsp:forward page=/main.do / in your index.jsp? :-) But then the URL will still have 'index.jsp' in it, at least if Tomcat is involved. IIRC, Tomcat redirects to the welcome page, so there's going to be something on the URL after the domain name. I think this is more a function of what HTTP server and Servlet Container you're using than something to do with Struts. Nope :-) This is the complete index.jsp file from www.christianbollmeyer.de: %@ page contentType=text/html; charset=ISO-8859-1 session=false % jsp:forward page=/main.do / which runs on Resin. But I used the same approach e.g. for www.anwalt4you.com which runs on Tomcat (5, but we didn't use Servlet 2.4 features which IIRC enable one to use a welcome file that doesn't physically exist, such as a Struts .do action, just to note). The mechanism itself is independent from container implementations: as a forward doesn't change the browser URL, you can just enter www.christianbollmeyer.de and it sticks to that, though main.do and Tiles do the actual job. If you invoke the above URL by explicitly specifying index.jsp (or main.do), the same is true, of course, but after all, that's just how it should work. -- Chris. Just to make sure: of course, I added index.jsp to the welcome-file list (web.xml). The only reason why I have it at all is the circumstance that the welcome file has to be a physical one. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hiding the .do part in the site address
On Friday 09 April 2004 22:42, Craig McClanahan wrote: Wendy Smoak wrote: From: Christian Bollmeyer [mailto:[EMAIL PROTECTED] Already tried s/th like jsp:forward page=/main.do / in your index.jsp? :-) But then the URL will still have 'index.jsp' in it, at least if Tomcat is involved. IIRC, Tomcat redirects to the welcome page, so there's going to be something on the URL after the domain name. I think this is more a function of what HTTP server and Servlet Container you're using than something to do with Struts. Whether the container does a forward or a redirect is container dependent ... IIRC Tomcat 5 went back to using a forward for this. Craig Thanks - learned something new :-) Well, so Resin, Oracle iAS, Orion and Tomcat 5 do a forward, while Tomcat 4.1.27 seems to do a redirect indeed. Strangely enough, Hans Bergsten's LWS 3 (which is built on the TC 4.1.27 core) does not. But it's too late tonight for further investigation :-) -- Chris. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Hiding the .do part in the site address
From: Christian Bollmeyer [mailto:[EMAIL PROTECTED] Nope :-) Yes, I stand corrected by Craig already. Tomcat used to redirect, and I'd occasionally dig up an ancient bug report where the decision was made in order to convince people that no, you can't make it stop redirecting. But now you can, with Tomcat 5. :) -- Wendy Smoak Application Systems Analyst, Sr. ASU IA Information Resources Management - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]