Meaningless Drivel is fun!*
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "browser stopping at .do page" Watch "browser stopping at .do page" New topic
Author

browser stopping at .do page

Paul Giancola
Greenhorn

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 logon.do page. Why would this be? Any help would be appreciated.
Paul


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 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.


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

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

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="http://www.johnboy.co.za" target="_blank" rel="nofollow">http://www.johnboy.co.za</a><br />Change - When the winds of change blow hard enough, the most trivial things can turn into deadly projectiles.
Paul Giancola
Greenhorn

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 '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

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! :-) richardw@discovery.co.za
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: browser stopping at .do page
 
Similar Threads
Travel Agent Login
Applet revesit problem - Help pls
why .class cannot be loaded?
Revisiting an Applet - Urgent
GET does not include JSESSIONID