Meaningless Drivel is fun!*
The moose likes Struts and the fly likes will it possible to use action.do in normal form tag of html language Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "will it possible to use action.do in normal form tag of html language" Watch "will it possible to use action.do in normal form tag of html language" New topic
Author

will it possible to use action.do in normal form tag of html language

sumanth divvela
Greenhorn

Joined: Dec 19, 2005
Posts: 10
sorry i didn't understand what u mean i.e, here what is /myApp/
[ December 19, 2005: Message edited by: sumanth divvela ]
Dan Platon
Greenhorn

Joined: Jan 27, 2004
Posts: 4
Although it's a Struts question I will answer it here:

Yes, you can use struts actions in normal html <form>s, just be sure to specify the whole path to the action, something like /myApp/myAction.do
Example:


Hope this helps.

Dan
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Moved to the Struts forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Daniel Platon
Ranch Hand

Joined: Oct 10, 2005
Posts: 42
Ok, so you have your form ... This form points to a certain action within the application context. This action has a specific url. Let's say you application has the following url:

In the above case the server will call something like

when you submit the form.
When you use <html:form action="/myAction"> struts automatically translates "/myAction" to "/myApplication/myAction.do". Since you don't want to use struts' <html:form> tag you will have to do this yourself, like this:

Since you want the code to be portable (i.e. not to depend on the application name) you may want to put

instead of /myApplication (so you can change the name to /myOtherApplication and still use the form).

Hope it's clear now.

Dan

PS: Try not to edit your original post when you answer. Post a reply instead.
[ December 19, 2005: Message edited by: Daniel Platon ]
sumanth divvela
Greenhorn

Joined: Dec 19, 2005
Posts: 10
sorry i am new to this forum that's i have done mistake ....

i will try with ur answer. I'll give reply soon ..ok

thank you
sumanth divvela
Greenhorn

Joined: Dec 19, 2005
Posts: 10
ok i tried with ur suggestions but still i am getting same error.
i have posted the same question today also sir in that i have mentioned everything with code my intension. please check the posted question sir.
sumanth divvela
Greenhorn

Joined: Dec 19, 2005
Posts: 10
Thank you sir that problem is solved with your answer. Ok

Bye
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: will it possible to use action.do in normal form tag of html language
 
Similar Threads
I Always Wanna Post Java Related Topics
Software Life
Unregistered?
World Market
WA #2 ..... word association