• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

is it possible to have multiple actions in a single page?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a combo box that needs to call a specific action and i used the javascript onchange event handler.

my code goes like this


in my jsp page:


my JavaScript function:


my sturts configuration:


im hetting an HTTP error Status 404
The requested resource (/selectrcp) is not available.

Can you please help me find where i went wrong or is this possible??


 
Ranch Hand
Posts: 247
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes , you can have multiple Actions in a single page.

But i guess the problem is something else.

I suppose struts action mapping.


Thanks
raza!
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i think you must write HTML method name while submiiting your form like....



and remove / from

document.forms[0].action="/selectrcp";

may this will help you...
 
Ranch Hand
Posts: 93
Python Redhat Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I guess you need to add a

.do

with the action like

selectrcp.do



 
Lovely Reyes
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, thank you for your suggestions my application is now working
my code goes like this

function selectrcp() {
document.forms[0].method="post";
document.forms[0].action="selectrcp.do";
document.forms[0].submit();
}



Thank you very much for the help
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!