Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

context path and struts path

 
Ranch Hand
Posts: 798
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me assume I didn't do any context path setup in server.xml and web.xml

I have one page :

/pages/Menu.jsp (same as webapps/myTest/pages/Menu.jsp in Tomcat ).

Inside Menu.jsp above, I have a link , I found :

1. "./login.do" same as "/pages/login.do"
2. "login.do" same as "/pages/login.do"
3. "/login.do" same as "http://localhost:8080/login.do";

1. If what I want is "http://localhost:8080/myTest/login.do", how could I do ? and how to set up struts action path ?

2. if what I want is "http://localhost:8080/myTest/MyPackage/login.do", how to do it ? and how to set up struts action path ?

Thanks.
 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Edward Chen:
Let me assume I didn't do any context path setup in server.xml and web.xml

I have one page :

/pages/Menu.jsp (same as webapps/myTest/pages/Menu.jsp in Tomcat ).

Inside Menu.jsp above, I have a link , I found :

1. "./login.do" same as "/pages/login.do"
2. "login.do" same as "/pages/login.do"
3. "/login.do" same as "http://localhost:8080/login.do";

1. If what I want is "http://localhost:8080/myTest/login.do", how could I do ? and how to set up struts action path ?

2. if what I want is "http://localhost:8080/myTest/MyPackage/login.do", how to do it ? and how to set up struts action path ?

Thanks.




HI Pls be specific even i cant able to get idea what ur exactly trying to get from forum.....

u canb call the action freom jsp page by directly placing /xxxx/yyyy.do in jsp page...
req will pass by thru Request Processor i mena action servlet then to appriopirate Action.....
 
Something must be done about this. Let's start by reading this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic