Re: Google and Struts
Google certainly crawls my site, which uses .do actions, and does a pretty good job; I get a number of visitors referred straight into the .do pages (which are all eg showTopic.do?topic=nn) from Google searches. On the other hand, I don't do URL rewriting, so don't have the jsessionid thingies. I took the decision not to do URL rewriting because - I don't need to track sessions - the jsessionid thingies screwed up the crawler from Atomz, which I use to provide site searching. HTH. Louise On Monday, September 15, 2003 at 8:57:56 PM, Christian Bollmeyer wrote: CB> Hi, CB> just a simple Question: CB> 1.) does Google follow links to Struts actions (ending with .do)? CB> 2.) if so, does it make a difference if the ;jsessionid thing is CB> appended to the URL? CB> Background is that I'm working on a larger site that uses CB> Struts for request processing and content delivery, with CB> most Actions being mere forwards to static HTML and CB> JSP pages. Now, from the logs I can tell the GoogleBot CB> is analyzing the top page "/" (which contains an abundance CB> of additional .do links), but then just goes away. Well, CB> that should not be so. Though we've already searched all CB> other resources available on the web, none of them CB> seems to deal with Struts in particular. So finally, I'm CB> asking that question here. In the meantime, we've CB> already tried suppressing all session information CB> (calling the 'default' Forward action will always open CB> up a session and append the 'jsessionid' to all CB> page links if Cookies are disabled - which is the CB> case with Search Robots - regardless if the JSPs CB> don't require a session, and even though this is CB> explicitly switched off via a <[EMAIL PROTECTED] %> directive CB> stating session="false"; quick solution: write a custom CB> PageAction that just does the same). If anybody CB> here has any experience with this Google problem, CB> I'd really be glad to learn from your knowledge. CB> Or does Google generally follow .do links as well, CB> and something else in the site may probably be CB> wrong? CB> To share some of my thoughts, a countermeasure CB> might be to have Struts also handle requests with CB> a .htm (three letters) ending, thus tricking Google CB> into believing to analyze a static file, though in effect, CB> a Struts Action is invoked. It won't be able to tell, CB> not even when forwarding etc. Static HTML files could CB> retain a .html (4 letters) ending and be delivered and CB> indexed as-is. Or the other way round. I'm not sure if CB> I really like this approach, but still. Suppressing the CB> 'jsessionid' thing on the top page didn't make any CB> difference yet. CB> What are your experiences? CB> -- Chris (SCPJ2) CB> - CB> To unsubscribe, e-mail: [EMAIL PROTECTED] CB> For additional commands, e-mail: [EMAIL PROTECTED] -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:errors tag..
On Monday, September 15, 2003 at 3:22:27 PM, Ritvik wrote: R> Hi There, R> I am using tag at top of my page to display any R> validation errors when a form is submitted, but for some reason, I R> couldn't see any errors message even I have left some mandatory fields R> blank. I am not getting any errors in server log as well. R> I have added the validation logic in validate() method of ActionForm R> subclass. I think Struts adds ActionErrors object in the request\session R> scope with a know key, can anyone let me know the exaclt key name? Are you sure you are actually calling the validate() method? Either validate="true" in the action definition or call the validate() method explicitly in the execute() method of the action as follows: errors = myForm.validate(mapping, request); // see if we found any validation errors if ( ! errors.isEmpty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput())); } // end of if () -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Icon?
On Tuesday, September 9, 2003 at 7:12:47 AM, Bjørn T Johansen wrote: BTJ> Well, I want to change the icon that appear in front of the url in the BTJ> browser, I see other use it... >> >> 2. Is the element in the right place in the web.xml file? An editor >> that does XML validation (like IntelliJ IDEA and other IDEs and XML editors) >> is very helpful for pointing out such errors. BTJ> I tried moving it around and the only thing that happens is that I am BTJ> getting an error msg if I am putting it under the servlet tag and under BTJ> the web tag nothing happens. BTJ> I also tried setting this in the header: BTJ> " BTJ> type="image/x-icon" /> BTJ> but nothing... The has caused me problems here in the past (and with style files too). The trouble is the jsessionid. I have found it safer to use This does have the disadvantage that you specify the file name, not the forward. -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Logging to application directory
Is there any easy way of sending logs to somewhere in my application directory, rather than eg Tomcat/logs? The latter is OK when I'm developing the application on my own machine, but when I deploy onto my shared host I don't have access to the Tomcat logs directory. And however carefully I test on my own machine, I can't reproduce the environment exactly and there's always something that goes wrong. I have totally failed to get to grips with logging so far, so any help will be appreciated. Thanks Louise -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaActionForms and html:text tags
On Monday, August 18, 2003 at 12:25:38 PM, Dirk Markert wrote: DM> Hello Louise, DM> what's the action and its mapping you are using to forward to your DM> jsp containing DM> DM> On Monday, August 18, 2003 at 12:22:31 PM, Hue Holleran wrote: HH> How are you accessing your page - if you're calling the jsp direct then then HH> struts will not have the opportunity to put the bean into scope for you? Thanks. It looks like we are converging on an answer. I am calling the jsp direct. From what you say it looks as if I should go via an action. What should that action do, or what should its mapping contain, to make things work? -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaActionForms and html:text tags
On Monday, August 18, 2003 at 11:59:46 AM, Dirk Markert wrote: DM> Hello Louise, DM> can you post your action mapping? Everything else looks fine. DM> *** LP>> I'm having problems getting a DynaActionForm to work with a jsp page, LP>> and wondered if anyone could help. LP>> I've defined all the properties in the DynaActionForm using LP>> tags. They all have type java.lang.String. The form LP>> is mapped to the Action in the usual way. Actual extracts from the LP>> files at the end of this message. LP>> I have a jsp page with an html:form tag that refers to the action. The LP>> trouble is, that none of the html:text tags work (they refer to LP>> properties as defined in the form). The symptom of the not working is LP>> org.apache.jasper.JasperException: No getter method for property LP>> of bean org.apache.struts.taglib.html.BEAN LP>> An html:hidden tag and an html:password tag on the same form work LP>> fine. Could this be something to do with the fact that the hidden tag LP>> has a value set, and the password tag has redisplay="false", so that LP>> neither of them are looking in the form bean for values? LP>> Any help would be greatly appreciated. I am sure there is something LP>> basic I haven't done right, but I can't think what. -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaActionForms and html:text tags
I'm having problems getting a DynaActionForm to work with a jsp page, and wondered if anyone could help. I've defined all the properties in the DynaActionForm using tags. They all have type java.lang.String. The form is mapped to the Action in the usual way. Actual extracts from the files at the end of this message. I have a jsp page with an html:form tag that refers to the action. The trouble is, that none of the html:text tags work (they refer to properties as defined in the form). The symptom of the not working is org.apache.jasper.JasperException: No getter method for property of bean org.apache.struts.taglib.html.BEAN An html:hidden tag and an html:password tag on the same form work fine. Could this be something to do with the fact that the hidden tag has a value set, and the password tag has redisplay="false", so that neither of them are looking in the form bean for values? Any help would be greatly appreciated. I am sure there is something basic I haven't done right, but I can't think what. -- Louise Pryor http://www.louisepryor.com - from struts-config.xml ... from the jsp file: : : (the error happens on email - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaValidatorForm and DynaValidatorActionForm
What is the difference between DynaValidatorForm and DynaValidatorActionForm ? What would be the reasons for using one over the other? (And have I missed something obvious in the documentation here?) Thanks for any help! -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]