File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

browser stopping at .do page

 
Paul Giancola
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
David Hibbs
Ranch Hand
Posts: 374
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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?
 
Richard Walton
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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! :-) richardw@discovery.co.za
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic