Hi, That is ok,but i am using war deployment not ear architecture. Actually I am not having any problem with default context assign by war archive same as project name.
But once i am going to host my application with apache web server my web master suggested to eliminate extra names from url like /XYZ from url. see the orginial url for my application is http://127.0.0.1:8080/XYZ/ The apache virtual host proxy code converts it to the http://www.demo.com/ Now the problem arise for apache + tomcat proxy is that Struts2 generates urls,forms starts with /context e.g /XYZ like /XYZ?serverId=100 and i want that only /?serverId=100 in short i want context root URL as only "/" no XYZ or anything. I want my apache + tomcat application URL like http://www.demo.com/customer.action instead of http://www.demo.com/XYZ/customer.action http://www.demo.com/customer.action?serviceId=100 instead of http://www.demo.com/XYZ/customer.action?serviceId=100 Do anyone have solution for this ? Thanks again. Omkar Patil wrote: > > Jignesh, > > XYZ seems to be the context root for your web application. Context root > comes from application.xml of your application. Here is the snippet from > application.xml > > <module> > <web> > <web-uri>myapp.war</web-uri> > <context-root>XYZ</context-root> > </web> > </module> > > If that's the case, then it's outside of Struts2, and it will be there in > the URL. Check if this is the case for you. > > -Omkar > > > jignesh(india) wrote: >> >> Hi, >> I want to do something with urls generated by struts2. >> >> The situation like this >> >> My project name e.g XYZ >> if i use struts2 tags :- e.g <s:form method="post" theme="simple" >> action="viewDetail.action"> ....</s:form> and >> generated html by struts is something like >> >> <form method="post" action="/XYZ/viewDetail.action" onsubmit="return >> true;" name="customer" id="customer"> >> >> the action tag contains /XYZ prefix with any of the link,action generated >> by the struts2. >> >> I want just simple action="viewDetail.action" instead of >> action="/XYZ/viewDetail.action". >> >> Can anybody help me,how can i prevent struts2 to add projectname,context >> e.g /XYZ in my case to the generated links,actions...etc ? >> >> Thanks in advanced, >> Jignesh >> >> > > -- View this message in context: http://www.nabble.com/Struts-Context-problem-tp14022085p14395909.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]