File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
sumanth divvela
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Struts forum.
 
Daniel Platon
Ranch Hand
Posts: 42
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you sir that problem is solved with your answer. Ok

Bye
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic