File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How would i call MyAction from pages/user/admin.jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How would i call MyAction from pages/user/admin.jsp?" Watch "How would i call MyAction from pages/user/admin.jsp?" New topic
Author

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

Bibhudutta Pradhan
Ranch Hand

Joined: Jun 24, 2011
Posts: 31

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

Joined: Aug 01, 2007
Posts: 485

Create a namespace user and put your jsp inside that user for more details refer the following link NameSpace


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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

Joined: Aug 01, 2007
Posts: 485

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

Joined: Apr 16, 2008
Posts: 2187
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

Joined: Jun 24, 2011
Posts: 31

The problem has been solved with namespace

Thanks guys. Thanks to every body.
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

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

Joined: Jun 24, 2011
Posts: 31

pages/admin/admin.jsp
pages/admin/success.jsp

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



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


pages is the root namespace.

Thats All


Again thanks to all.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How would i call MyAction from pages/user/admin.jsp?