Re: can't find webapp root?
Remove the leading slash in your href: window.opener.location.href=jsp/home.jsp; -Dan Thinh Doan wrote: I open a child window for form inputs and upon successful submit, I'd like to close this child window and also point the parent window to a specific page. I got 404 error but don't know how to fix it. Please give some hints. TIA, Thinh Code in close_window.jsp %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' % %@ taglib uri='/WEB-INF/tlds/struts-html.tld' prefix='html' % %@ taglib uri=/WEB-INF/tlds/struts-logic.tld prefix=logic % html head titleClosing window/title html:base/ script language=JavaScript !-- window.opener.location.href=/jsp/home.jsp; window.close(); // -- /script /head body /body /html The url of the parent window showed //localhost:8080/jsp/home.jsp It should be //localhost:8080/mywebapp/jsp/home.jsp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: can't find webapp root?
Thinh, Ypou got to use html:rewrite page=url which rewrites and sets ur webapp Regards, Taati -Original Message- From: Thinh Doan [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 12:20 PM To: Struts-User Subject: can't find webapp root? I open a child window for form inputs and upon successful submit, I'd like to close this child window and also point the parent window to a specific page. I got 404 error but don't know how to fix it. Please give some hints. TIA, Thinh Code in close_window.jsp %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' % %@ taglib uri='/WEB-INF/tlds/struts-html.tld' prefix='html' % %@ taglib uri=/WEB-INF/tlds/struts-logic.tld prefix=logic % html head titleClosing window/title html:base/ script language=JavaScript !-- window.opener.location.href=/jsp/home.jsp; window.close(); // -- /script /head body /body /html The url of the parent window showed //localhost:8080/jsp/home.jsp It should be //localhost:8080/mywebapp/jsp/home.jsp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: can't find webapp root?
Thanks Dan Taati, I had to remove /jsp and it now works. Great! Thinh -Original Message- From: Dan Hensgen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 05, 2002 11:33 AM To: Struts Users Mailing List Subject: Re: can't find webapp root? Remove the leading slash in your href: window.opener.location.href=jsp/home.jsp; -Dan Thinh Doan wrote: I open a child window for form inputs and upon successful submit, I'd like to close this child window and also point the parent window to a specific page. I got 404 error but don't know how to fix it. Please give some hints. TIA, Thinh Code in close_window.jsp %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' % %@ taglib uri='/WEB-INF/tlds/struts-html.tld' prefix='html' % %@ taglib uri=/WEB-INF/tlds/struts-logic.tld prefix=logic % html head titleClosing window/title html:base/ script language=JavaScript !-- window.opener.location.href=/jsp/home.jsp; window.close(); // -- /script /head body /body /html The url of the parent window showed //localhost:8080/jsp/home.jsp It should be //localhost:8080/mywebapp/jsp/home.jsp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: can't find webapp root?
Hi Thinh, make the location.replace() URL relative to the page you are on - i.e. ../jsp/home.jsp or whatever. Because of the html:base tag, the browser will know where to go. Adam Thinh Doan wrote: I open a child window for form inputs and upon successful submit, I'd like to close this child window and also point the parent window to a specific page. I got 404 error but don't know how to fix it. Please give some hints. TIA, Thinh Code in close_window.jsp %@ taglib uri='/WEB-INF/tlds/struts-template.tld' prefix='template' % %@ taglib uri='/WEB-INF/tlds/struts-html.tld' prefix='html' % %@ taglib uri=/WEB-INF/tlds/struts-logic.tld prefix=logic % html head titleClosing window/title html:base/ script language=JavaScript !-- window.opener.location.href=/jsp/home.jsp; window.close(); // -- /script /head body /body /html The url of the parent window showed //localhost:8080/jsp/home.jsp It should be //localhost:8080/mywebapp/jsp/home.jsp -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]