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

Getting Bad Request

Akshay Singhvi
Ranch Hand

Joined: Nov 08, 2005
Posts: 93
Hello Ranchers,
In my application i have a jsp in which i 'm writing a line


When i click on the link it gives HTTP 400 bad request error:

the struts-config.xml file has the entry :


The action class has the method displayDepartment

What's wrong in this?


Regards,<br />Akshay Singhvi<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (86%)
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
In this case, I'd suggest using the page attribute of <html:link> rather than the href. While href evaluates the URI the same as an <a> html tag would, page evaluates it relative to the context root. For more information, see the heading "link" in this document.

In your example, the code would be:



Merrill
Consultant, Sima Solutions
Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
I think you need to redirect to jsp without performing any loginc.In that case you can try this, index.jsp in the jsp you need to redirect.


Hope this helps.

Thanks and Regards,
Arul.
Akshay Singhvi
Ranch Hand

Joined: Nov 08, 2005
Posts: 93
I tried this:


But i'm getting a blank page with this in the address bar :
http://localhost:9080/wcw/displayDepartment.do?methodToCall=displayDepartment

what is wrong in this???
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The most likely cause of this problem is that the execute method of the com.mmm.wcw.web.admin.department.DepartmentLoadAction class may be returning a null ActionForward. Put some System.out.println statements in your code to display the ActionForward just before it's returned and see if maybe this is the case.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting Bad Request