OK, I'll bite.

Please note that a lot of this is using inferred information since you don't provide it in your mail message.

Responses inline

On 3/25/2013 9:39 AM, Jigi Sheth wrote:
My current set up in Tomcat 7 is when I drop my Application.war to
`\Tomcat7\webapps\` directory, it gets auto deployed
`\Tomcat7\webapps\root\` directory.


===
Case is important - the directory must be ROOT, even on Windows.
===

To access my site in testing I use following

http:\\mytestserver.mysitename\Login.html

During testing I also noticed that if i do

http:\\mysitename\

it gets me to my default page [default.html]


===
So you have a page called default.html and it's specified like this:

<welcome-file-list>
    <welcome-file>default.html</welcome-file>
</welcome-file-list>

in your web.xml
===


I am trying to change the way this is currently set up to following

The auto deploy of `Application.war` can still occur to
`\Tomcat7\webapps\root\` directory.


===
No, the auto-deploy of the application (if you've named it Application.war) should create a \Tomcat7\webapps\Application directory - provided you've left the default server.xml unpackWARs="true" for your Host element alone.
====

To access site, I would like to use following URL

http:\\mytestserver.mysitename\Application.war\Login.html


===
Hopefully you mean:

http://mytestserver.mysite/Application/Login.html

Note the above:

1. Slashes are not Windows-based
2. Application - not Application.war

Naming a file called Application.war.war (to generate an Application.war URL) will cause double deployment. At least it did on my quick test . . .
===

and anyone using the previously bookmarked address

http:\\mytestserver.mysitename\Login.html

get redirected to

http:\\mytestserver.mysitename\Application.war\Login.html



===
And now we get to the heart of the problem . . . .
===

I have the following redirect in my `apache/conf/httpd.conf`

JkMount /*.html ajp13


===
Ah, so you have a front end Apache HTTPD server connected via AJP. This is nice to know.
===

and my worker.properties file has following host info

worker.ajp13.host=http:\\mytestserver.mysitename


===
And you're trying to use mod_jk . . .

The above two lines (the JkMount and the worker.ajp.host) are problematic at best.

The first will almost certainly not get you what you want, and the second appears to be a mix of mod_proxy_http and mod_ajp. The second line will not work at all.

If you're using mod_jk, one clean set of JkMounts is:

JkMount /Application/ ajp13
JkMount /Application/* ajp13

I won't address your workers.properties file in this message. However, please read the following link:

http://tomcat.apache.org/connectors-doc/reference/workers.html

Also, download the source code for the connector, unpack it, and look in conf subdirectory. There are some very good examples on how to set up workers.properties, uriworkermap.properties, and httpd.conf (httpd-jk.conf).

Finally, since you're using Apache HTTPD in front of your Apache Tomcat, you could use a Redirect directive in httpd.conf to accomplish your goal.

Something like the following might work:

RedirectMatch permanent /(.*) http://mytestserver.mysitename/Application/$1

Please note that the above line may be wrapped (it should be on one line).

===


Reference used: [How to set up sites in Tomcat7][1]
[How_do_I_make_my_web_application_be_the_Tomcat_default_application][2]




[1]:http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application_.3F


> [2]:http://wiki.apache.org/tomcat>
> /HowTo#
> How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F


. . . . just my two cents.
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to