RE: Setting a Welcome File + Tiles + PreCompiled JSP's
I remember reading something when we first started building our STRUTS application that said that you had to have a physical file outside the WEB-INF directory representing your welcomefile. All of our JSPs reside in a subdirectory under WEB-INF, so we put a blank file named index.do in the root directory and it works like a charm (no redirects needed). Kevin -Original Message- From: K.C. Baltz [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: Setting a Welcome File + Tiles + PreCompiled JSP's I just have an index.jsp that I still include in the war, even though all my JSPs are pre-compiled. I'm not actually sure if the file version or the pre-compiled version gets called. Doesn't really matter I guess.And I use a META refresh to redirect to my main page: "> K.C. Pat Quinn wrote: > I'm using tiles and i know i can't set the attribute in > web.xml to a tile definition or a struts action url. I'm also > precompiling all my JSP's so i can't assign it to a JSP... i was > thinking about assign it to a html file and then onLoad i could > redirect to my logon action url... to do this i'd have to hard code > the ipaddress and port number into my url so i don't really want to do > that. Any ideas how i might do this? > > _ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] *** This electronic mail transmission contains confidential and/or privileged information intended only for the person(s) named. Any use, distribution, copying or disclosure by another person is strictly prohibited. *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting a Welcome File + Tiles + PreCompiled JSP's
I just have an index.jsp that I still include in the war, even though all my JSPs are pre-compiled. I'm not actually sure if the file version or the pre-compiled version gets called. Doesn't really matter I guess.And I use a META refresh to redirect to my main page: "> K.C. Pat Quinn wrote: I'm using tiles and i know i can't set the attribute in web.xml to a tile definition or a struts action url. I'm also precompiling all my JSP's so i can't assign it to a JSP... i was thinking about assign it to a html file and then onLoad i could redirect to my logon action url... to do this i'd have to hard code the ipaddress and port number into my url so i don't really want to do that. Any ideas how i might do this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Setting a Welcome File + Tiles + PreCompiled JSP's
I use a filter to catch requests that map to "/" and request my Homepage.do action instead. So I don't have any index.html or index.jsp page at all. I think the 2.3 spec wants some sort of file to map to. I did hear of one person who set the to 'index.do' and put a dummy index.do file in there (with a note that it was a dummy and not to delete). The web container was happy because there was a file there called 'index.do'. Since Struts is mapped to process *.do, the person defined an action called 'index' and struts could do its normal processing, forwarding off to the .jsp in /WEB-INF/. I don't know if that is portable amongst containers though. Pat Quinn wrote: I'm using tiles and i know i can't set the attribute in web.xml to a tile definition or a struts action url. I'm also precompiling all my JSP's so i can't assign it to a JSP... i was thinking about assign it to a html file and then onLoad i could redirect to my logon action url... to do this i'd have to hard code the ipaddress and port number into my url so i don't really want to do that. Any ideas how i might do this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Setting a Welcome File + Tiles + PreCompiled JSP's
Use the HTML tag? Or, alternatively if you want to use window.onLoad - checkout the source on IE's error page that does this pretty effectively by extracting the server information from document.location.href - full source attached below (you'll need to identify the appropriate bits): a:link {font:8pt/11pt verdana; color:red} a:visited {font:8pt/11pt verdana; color:#4e4e4e} HTTP 404 Not Found function Homepage(){ // in real bits, urls get returned to our script like this: // res://shdocvw.dll/http_404.htm#<a href="http://www.DocURL.com/bar.htm">http://www.DocURL.com/bar.htm</a> //For testing use DocURL = "res://shdocvw.dll/http_404.htm#<a href="https://www.microsoft.com/bar.htm"">https://www.microsoft.com/bar.htm"</a>; DocURL = document.location.href; //this is where the http or https will be, as found by searching for :// but skipping the res:// protocolIndex=DocURL.indexOf("://",4); //this finds the ending slash for the domain server serverIndex=DocURL.indexOf("/",protocolIndex + 3); //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker. //urlresult=DocURL.substring(protocolIndex - 4,serverIndex); BeginURL=DocURL.indexOf("#",1) + 1; if (protocolIndex - BeginURL > 7) urlresult="" urlresult=DocURL.substring(BeginURL,serverIndex); //for display, we need to skip after http://, and go to the next slash displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex); // Security precaution: must filter out "urlResult" and "displayresult" forbiddenChars = new RegExp("[<>\'\"]", "g"); // Global search/replace urlresult = urlresult.replace(forbiddenChars, ""); displayresult = displayresult.replace(forbiddenChars, ""); document.write('<A target=_top HREF="' + urlresult + '">' + displayresult + "</a>"); } The page cannot be found The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please try the following: If you typed the page address in the Address bar, make sure that it is spelled correctly. Open the Homepage(); home page, and then look for links to the information you want. Click the Back button to try another link. Click Search to look for information on the Internet. HTTP 404 - File not found Internet Explorer > -Original Message- > From: Pat Quinn [mailto:[EMAIL PROTECTED] > Sent: 21 August 2003 12:17 > To: [EMAIL PROTECTED] > Subject: Setting a Welcome File + Tiles + PreCompiled JSP's > > > I'm using tiles and i know i can't set the attribute in > web.xml to a tile definition or a struts action url. I'm also > precompiling > all my JSP's so i can't assign it to a JSP... i was thinking > about assign it > to a html file and then onLoad i could redirect to my logon > action url... to > do this i'd have to hard code the ipaddress and port number into > my url so i > don't really want to do that. Any ideas how i might do this? > > _ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Setting a Welcome File + Tiles + PreCompiled JSP's
I'm using tiles and i know i can't set the attribute in web.xml to a tile definition or a struts action url. I'm also precompiling all my JSP's so i can't assign it to a JSP... i was thinking about assign it to a html file and then onLoad i could redirect to my logon action url... to do this i'd have to hard code the ipaddress and port number into my url so i don't really want to do that. Any ideas how i might do this? _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]