Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Lovely Reyes
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??


 
Raza Mohd
Ranch Hand
Posts: 247
Java MyEclipse IDE MySQL Database
  • 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!
 
Mamata Chaudhari
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...
 
Karthik Jayachandran
Ranch Hand
Posts: 91
Android Java Spring
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic