Form rendering problem
I'm using www.webappcabaret.com as a hosting service to host my domain name. They map the domain name to my context somehow. Unfortunately their documentation says the following: -However if your context has a domain alias other than the mainserver name then you may not include your context name in URLssent to the browser. I believe this is causing me problems when my forms get submitted. None of them work because they always get rendered with my context in the url such as: form action="/mycontext/action" when I think it should be form action="action" Any suggestion as to what I can do or how to fix it? Or do I just have to avoid using the html:form tags? Thanks, Rod Schmidt
Re: Form rendering problem
I tried replacing the html:form tags with normal form tags (i.e. not using the struts form tags) and and just used /action.do for the action and everything works. I would really prefer to use the struts tags. Any ideas? Thanks, Rod Schmidt - Original Message - From: Rod Schmidt To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 12:27 AM Subject: Form rendering problem I'm using www.webappcabaret.com as a hosting service to host my domain name. They map the domain name to my context somehow. Unfortunately their documentation says the following: -However if your context has a domain alias other than the mainserver name then you may not include your context name in URLssent to the browser. I believe this is causing me problems when my forms get submitted. None of them work because they always get rendered with my context in the url such as: form action="/mycontext/action" when I think it should be form action="action" Any suggestion as to what I can do or how to fix it? Or do I just have to avoid using the html:form tags? Thanks, Rod Schmidt
Re: Form rendering problem
Ah, but I do. Everything works great on my local machine with the url http://localmachine/context - Original Message - From: Pham Thanh Quan To: [EMAIL PROTECTED] ; Rod Schmidt Sent: Thursday, June 28, 2001 12:57 AM Subject: Re: Form rendering problem I think you don't have a form action class that is correlative with this form, so you can't use html:form. You should use form instead Quan - Original Message - From: Rod Schmidt To: [EMAIL PROTECTED] ; Rod Schmidt Sent: Thursday, June 28, 2001 1:38 PM Subject: Re: Form rendering problem I tried replacing the html:form tags with normal form tags (i.e. not using the struts form tags) and and just used /action.do for the action and everything works. I would really prefer to use the struts tags. Any ideas? Thanks, Rod Schmidt - Original Message - From: Rod Schmidt To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 12:27 AM Subject: Form rendering problem I'm using www.webappcabaret.com as a hosting service to host my domain name. They map the domain name to my context somehow. Unfortunately their documentation says the following: -However if your context has a domain alias other than the mainserver name then you may not include your context name in URLssent to the browser. I believe this is causing me problems when my forms get submitted. None of them work because they always get rendered with my context in the url such as: form action="/mycontext/action" when I think it should be form action="action" Any suggestion as to what I can do or how to fix it? Or do I just have to avoid using the html:form tags? Thanks, Rod Schmidt
Re: Form rendering problem
I've done exactly that. It still doesn't work with the domain name they have provided. Have you ever used a domain name from them? Everything worked fine before the domain name. I'm not sure what you mean be the action already being constructed. It is declared in struts-config.xml if that is what your talking about. In fact if I change the servlet mapping to include my context then the form action get generated with the context repeated twice as in /context/context/action.do Rod - Original Message - From: Michael Mok To: [EMAIL PROTECTED] ; 'Rod Schmidt' Sent: Thursday, June 28, 2001 2:58 AM Subject: RE: Form rendering problem Hi Rod Try this %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %... html:form action="/youraction.do" focus="yourformbeanproperty"/html "youraction.do" needs to be already constructed for the form HTML generation to work. I got a couple of contexts setup in webappcabaret.com (ie teatimej and normad) and they are both running fine (built on STRUTS!). Regards Michael Mok -Original Message-From: Rod Schmidt [mailto:[EMAIL PROTECTED]]Sent: Thursday, 28 June 2001 14:28To: [EMAIL PROTECTED]Subject: Form rendering problem I'm using www.webappcabaret.com as a hosting service to host my domain name. They map the domain name to my context somehow. Unfortunately their documentation says the following: -However if your context has a domain alias other than the mainserver name then you may not include your context name in URLssent to the browser. I believe this is causing me problems when my forms get submitted. None of them work because they always get rendered with my context in the url such as: form action="/mycontext/action" when I think it should be form action="action" Any suggestion as to what I can do or how to fix it? Or do I just have to avoid using the html:form tags? Thanks, Rod Schmidt
Re: Help: Problems deploying to domain name.
I'm using www.webappcabaret.com. You can go there and read all about there setup. From what I understand it is configured to call my stuff www.mydomain.com. The servlet engine is Tomcat 3.2 and is shared. The errors message I get is basically a request not found because it is trying to get /mycontext/mycontext/action instead of just /mycontext. If you want I can send you any of my logs and config files. Here's part of the log that show's one of the failures path="/missionvictory" :action: Processing a GET for /editRegistrationpath="/missionvictory" :action: Looking for ActionForm bean under attribute 'registrationForm'path="/missionvictory" :action: Creating new ActionForm instance of class 'org.missionvictory.pledge.RegistrationForm'path="/missionvictory" :action: Storing instance under attribute 'registrationForm' in scope 'request'path="/missionvictory" :action: Populating bean properties from this requestpath="/missionvictory" :action: Validating input form propertiespath="/missionvictory" :action: Looking for Action instance for class org.missionvictory.pledge.EditRegistrationActionpath="/missionvictory" :action: Double checking for Action instance already therepath="/missionvictory" :action: Creating new Action instancepath="/missionvictory" :action: EditRegistrationAction: Processing Create actionpath="/missionvictory" :action: Setting transactional control tokenpath="/missionvictory" :action: Forwarding to 'success' pagepath="/missionvictory" :jsp: initpath="/missionvictory" :action: Processing a POST for /missionvictory/saveRegistrationpath="/missionvictory" :action: No mapping available for path /missionvictory/saveRegistrationCtx( /missionvictory ): 400 R( /missionvictory + /missionvictory/saveRegistration.do + null) Invalid path /missionvictory/saveRegistration was requested Rod - Original Message - From: Abraham Kang To: Rod Schmidt Sent: Wednesday, June 27, 2001 12:27 PM Subject: RE: Help: Problems deploying to domain name. Hi Rob, Can you explain a bit about your set up. Do you have a web server that is transparently forwarding requests to a servlet engine (which one). Are you in a shared setup or do you have dedicated servers for your app only. What is the pattern or extension that causes the plug-in to proxy request to the servlet engine. What is the error message you are getting? How have you configured the web app to be called. My guess is through "mycontext". I know WebLogic has a DefaultWebApp_myserver that you could use for this purpose that would not append the "mycontext" to URLs. This is what I think is happening. Whoever has configured the www.mydomain.comwebserverhas configured it to call your servlet engine through a url like http://servletEngine/mycontextwhich causes the /mycontext to get pre-pended to the form's action attribute. This sounds like a configuration issues that I might be able to help you with when I find out more info. By the way, I have to leave in 30 minutes to run some errands. --Abraham -Original Message-From: Rod Schmidt [mailto:[EMAIL PROTECTED]]Sent: Tuesday, June 26, 2001 4:54 PMTo: [EMAIL PROTECTED]Subject: Help: Problems deploying to domain name. I have a web app and everything works fine under a URL like www.webappcabaret.com/mycontext. As soon as I got a domain name and tried to run things under http://www.mydomain.comthings don't work. I see the following symptons. - html:link href works but html:link page does not - The html:form tags are rendered with the action = "/mycontext/action". This results in the action not being found. These seem to be my two main culprits so far. Does anybody know what's happening? Thanks, Rod Schmidt
Help: Problems deploying to domain name.
I have a web app and everything works fine under a URL like www.webappcabaret.com/mycontext. As soon as I got a domain name and tried to run things under http://www.mydomain.comthings don't work. I see the following symptons. - html:link href works but html:link page does not - The html:form tags are rendered with the action = "/mycontext/action". This results in the action not being found. These seem to be my two main culprits so far. Does anybody know what's happening? Thanks, Rod Schmidt
Struts with a domain name
What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt
Re: Struts with a domain name
I am using the page attribute. This also happens for forms that get posted. If you look at the source that get's sent to the browser, /mycontext is getting inserted into the form actions and the URLs. Rod - Original Message - From: Yuriy Zubarev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 11:43 AM Subject: Re: Struts with a domain name Hello Rod, When you are working with html:link tag you can use its page attribute instead of href to specify context-relative URI. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Struts with a domain name
I'm doing all that. Nowhere to I refer to my context name. The webserver is inserting it into the URLs when it sends the generated page back to the browser. - Original Message - From: Yuriy Zubarev [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Rod Schmidt [EMAIL PROTECTED] Sent: Monday, June 25, 2001 1:24 PM Subject: Re: Struts with a domain name I'm developing a web-application on my workstation and testing it by going to localhost/whatever and when I'm satisfied with results I copy it to the main server where the application is accessible trough the internet as a www.whatever.com. So my situation is similar to yours and the way to make it happend is a) to use page attribute for html:link b) in struts-config.xml forward tag should have path attribute starts with / - this will ensure relative path (the same implies to input and path attributes of action tag) And whenever you see in your JSP, config or JAVA files a link like mycontext/page.jsp where mycontext is the name of your web-application (web-site), be careful because you may have problems moving the application to another location. In another words, always use relative pathes for local links. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: I am using the page attribute. This also happens for forms that get posted. If you look at the source that get's sent to the browser, /mycontext is getting inserted into the form actions and the URLs. Rod - Original Message - From: Yuriy Zubarev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, June 25, 2001 11:43 AM Subject: Re: Struts with a domain name Hello Rod, When you are working with html:link tag you can use its page attribute instead of href to specify context-relative URI. Best of luck, Yuriy Zubarev --- Rod Schmidt [EMAIL PROTECTED] wrote: What do you need to do to get your struts link to work properly under a domain name? I'm using webappcabaret and my stuff worked fine under www.webappcabaret.com/mycontext. I then got a domain name and I'm trying to run under www.mydomainname.com and I keep getting errors because the links and actions are trying to go to www.mydomainname.com/mycontext/whatever Any ideas? Thanks, Rod Schmidt __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: html:checkbox
Does this mean you can't default a checkbox to true? If you can, how do you do it? Thanks, Rod Schmidt - Original Message - From: Ted Husted [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 15, 2001 5:45 PM Subject: Re: html:checkbox They are actually cached in the request. It's just that with boolean checkboxes, you should reset them them to false first, or there are side effects. You really, really don't have to do anything else. It's important to remember that there is not a direct connection between the HTML form and Struts. Everything has to go through HTTP. When the form is submitted, all the properties are sent as parameters to the request by HTTP. Struts then catches them and puts them back into the ActionForm. What can happen with checkboxes is that if they get unchecked, the browser won't send them back, and so Struts has no way to set them true or false. By setting them to false when the form is initialized and to false again when the form is reset, you get consistent results. Otherwise, if they unchecked the box, and the browser didn't send it back, the setting on your box may be indeterminate. Mike Thompson wrote: So this means that I have to cache the original state of all my checkbox referenced vars so I can set them back in the reset method? :( --m