This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes browser stopping at .do page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "browser stopping at .do page" Watch "browser stopping at .do page" New topic

browser stopping at .do page

Paul Giancola

Joined: Dec 16, 2002
Posts: 6
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 page. Why would this be? Any help would be appreciated.

Thanks,<p>Paul C. Giancola
David Hibbs
Ranch Hand

Joined: Dec 19, 2002
Posts: 374
.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 -- 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.

"Write beautiful code; then profile that beautiful code and make little bits of it uglier but faster." --The team, Newsletter 039.
Paul Giancola

Joined: Dec 16, 2002
Posts: 6
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
I don't think I've missed anything,have I?
Richard Walton

Joined: Jul 01, 2002
Posts: 10
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

<a href="" target="_blank" rel="nofollow"></a><br />Change - When the winds of change blow hard enough, the most trivial things can turn into deadly projectiles.
Paul Giancola

Joined: Dec 16, 2002
Posts: 6
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 ''
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
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

Joined: Jul 01, 2002
Posts: 10
Well that output looks good! :-) Send me your code and jsp's amd stuff and i will have a look ate it! :-)
I agree. Here's the link:
subject: browser stopping at .do page
jQuery in Action, 3rd edition