aspose file tools*
The moose likes Struts and the fly likes Problem while submitting action through JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem while submitting action through JavaScript" Watch "Problem while submitting action through JavaScript" New topic
Author

Problem while submitting action through JavaScript

Anshul Jain
Greenhorn

Joined: May 10, 2006
Posts: 12
Hi,

I am facing a problem while submitting struts action through JavaScript.
I am submitting form using a JavaScring function which is called on Click of a link. function is like this:
function sf() {
document.forms[app].action = "/sub/app1/GetList.do";
document.forms[app].submit();
}

My web application name is "APP". Now when I click the link the action which is called on my IE browser is
https://localhost:8080/sub/app1/GetList.do

which does not have application name after localhost and it gives me 404: resource not found error whereas the right action should be
https://localhost:8080/APP/sub/app1/GetList.do

Is there anything wrong in my weblogic application setup?
vidya sagar
Ranch Hand

Joined: Mar 02, 2005
Posts: 580
change this too

document.forms[app].action = "/sub/app1/GetList.do";

To

document.forms[app].action = "sub/app1/GetList.do";

This may work....i am not sure
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem while submitting action through JavaScript