Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting Bad Request

 
Akshay Singhvi
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
Arulanand Dayalan
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic