Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
in my tomcat i need to create url to access that is different from my web app name so according to the web info i found , in server.xml in tomcat i added :
where MyAppGW is the directory of my web app then in MyAppGW web.xml i added :
so when i give to external client the url http://xx.xx.xx.xx:8888/console/ws/WsEndpoint it connects to my web app. every thing is working fine and great except that when i look in my tomcat webapps i see 2 directors is this normal ?:
the console is the same as the MyAppGW. i suspect this give me problems with other frameworks in my web app like log4j not Rolling and creating duplication of log files .
Thanks for the replay , but no . my war is MyAppGW.war .
it creates me and i dont know why another directory called "console"
i dont have any console.war .
and i dont know why could be because i configured in the server.xml
Don't put webapp Contexts in server.xml. That's been considered bad practice since Tomcat V4 or earlier. Put them as individual XML files in TOMCAT_HOME/catalina/localhost or in the WAR in META-INF/context.xml.
However, the process I described still applies. Tomcat is simply exploding the WAR under its context pathname instead of using the WAR basename.
Sometimes the only way things ever got fixed is because people became uncomfortable.
Can you please tell me how should this configuration look like , in for example i want to create file under : META-INF/context.xml?
just simple create context.xml file and put this: init :
<Context docBase="MyAppGW" path="/console" reloadable="true" /> ?
i did what you say and created the file under META-INF/context.xml
looks like this :
when tomcat starts it creates me the dirctory under conf\Catalina\localhost\
called : MyAppGW.xml with the context.xml content.
the problem is when i try to invoke the method to the old url , it failed and gives me :