• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Ranch Hand
Posts: 31
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Create a namespace user and put your jsp inside that user for more details refer the following link NameSpace
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Put a gun against his head, pulled my trigger, now he's dead, that tiny ad sure bled
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic