• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How would i call MyAction from pages/user/admin.jsp?

 
Bibhudutta Pradhan
Ranch Hand
Posts: 31
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m trying to call an action class from admin.jsp page

The page is inside : pages/user/admin/admin.jsp

How would i call MyAction from admin.jsp ??


if i put the admin.jsp directly inside the pages folder, MyAction is called easily.

please help.

 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a namespace user and put your jsp inside that user for more details refer the following link NameSpace
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Show us what the start-tag looks like in the JSP file and the mapping for MyAction from the confiugration file.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any pages at the root of your application (in the same place as your home page) will also have the namespace of / and any pages in the folder /namespacesFolder will have the namespace of /namespacesFolder. So in your struts.xml file you will have a node as follows:


We can specify in jsp as well.



 
Jimmy Clark
Ranch Hand
Posts: 2187
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to determine where the problem may lie, we should see how you are writing the code.

@Bibhudutta Pradhan : Show us what the start-tag looks like in the JSP file and the mapping for MyAction from the confiugration file.
 
Bibhudutta Pradhan
Ranch Hand
Posts: 31
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem has been solved with namespace

Thanks guys. Thanks to every body.
 
Mohana Rao Sv
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your problem is resolved show how did you solved it helpful for other who were having same kind of problem and make it resolved.
 
Bibhudutta Pradhan
Ranch Hand
Posts: 31
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pages/admin/admin.jsp
pages/admin/success.jsp

admin.jsp
-------------------------------



struts.xml
----------------------------------


pages is the root namespace.

Thats All


Again thanks to all.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic