• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

browser stopping at .do page

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,
I'm new to struts and am seeing something weird. I have an application which requires logon. I have set up LogonForm & LogonAction classes to handle this and have configured them in stuts-config.xml as needed.
Now the weird part, when I logon the browser goes to a logon.do page. Why would this be? Any help would be appreciated.
Paul
 
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
.do is the standard extension that the Struts Action servlet responds to. Forms submit to a target, and in struts this is automatically filled as login.do -- view the source of your login form to see it. Make sure the path is right. I would guess that the problem is either an exception (check the error log) or a lack of a .properties file for the app. Viewing the source and the server logs can be your best friends for getting started with struts.
 
Paul Giancola
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David,
I'm glad you brought the above up. Unfortunately, I've confirmed the *.properies file is there and I've also looked at the source of the logon form. The action places it to logon.do.
I don't think I've missed anything,have I?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you checked out your web.xml file in your web-inf? It should have something looking like this in it:
You see in the web xml you are telling the web server that all url patterns ending with .do must be routed through the Struts Action.
Hope this helps
 
Paul Giancola
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've confirmed that my web.xml has the correct configuration for the action servlet.
The log shows the below
Processing a POST for /logon
action: Setting locale 'en_US'
action: Looking for ActionForm bean under attribute 'LogonForm'
action: Creating new ActionForm instance of class 'com.irt.it.logon.LogonForm'
action: Storing instance under attribute 'LogonForm' in scope 'request'
action: Populating bean properties from this request
action: Validating input form properties
action: No errors detected, accepting input
action: Looking for Action instance for class com.irt.it.logon.LogonAction
action: Double checking for Action instance already there
action: Creating new Action instance
And that is it. Is this what I should be seeing?
 
Richard Walton
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well that output looks good! :-) Send me your code and jsp's amd stuff and i will have a look ate it! :-) [email protected]
 
reply
    Bookmark Topic Watch Topic
  • New Topic