-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zé,

On 2/18/2010 4:51 PM, zé wrote:
>> Interesting. What is the URL you are trying to access?
> I tryed access a directory containing images. Each image is accessed
> correctly, but the whole directory don't, generating the HTTP 404 status.

If you got /403/, then it's most likely that the DefaultServlet (which
serves anything that hasn't been mapped to another servlet, such as
static files and directories and such) hasn't been configured to serve
directory indexes. You can do this by copying the configuration for
"DefaultServlet" from TOMCAT_HOME/conf/web.xml into your webapp's
WEB-INF/web.xml file -- the one from your webapp will override Tomcat's
defaults -- and modifying that configuration so that directory indexes
are enabled. conf/web.xml is well-documented so you should be able to
see what settings to change.

>> Can you give us more details? 
> I was using a AJAX request (using JQuery) to load the servlet content into
> the page generated by the PHP script. 
> I've moved the PHP script to an other machine (better configured) and now
> the HTTP status is 200, but the response is blank... 
> So, I've tested to use a IFRAME HTML tag instead the AJAX request and it
> works... o_O 

Hmm... well, it appears that someone already did that configuration for
you, then. :)

>> Also, if you can enable the AccessLogValve and post the log
> file generated by that.
> I've never used the AccessLogValve, can you help me? :)

The documentation is shown as an example of using "valves" in Tomcat:
http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html

Just put the <Valve> element inside your <Context> in
META-INF/context.xml for your webapp.

>> Finally, please post your webapp's
> entire web.xml file and all <Host> entries from conf/server.xml so we
> can see what mappings are being used.
> There isn't nothing special in these files - both are with only standard
> configuration. (bad behaviour, I know). It's because still in a developing
> enviorment...

No, actually leaving conf/server.xml in it's default configuration is
one of the best things you /can/ do: it means that you haven't broken
any of your <Host>s or webapp deployments :)

> ----------------- <Host> elements into server.xml --------------------------
>      <Host name="localhost"  appBase="webapps"
>             unpackWARs="true" autoDeploy="true"
>             xmlValidation="false" xmlNamespaceAware="false">
> 
>         <!-- SingleSignOn valve, share authentication between web
> applications
>              Documentation at: /docs/config/valve.html -->
>         <!--
>         <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
>         -->
> 
>         <!-- Access log processes all example.
>              Documentation at: /docs/config/valve.html -->
>         <!--
>         <Valve className="org.apache.catalina.valves.AccessLogValve"
> directory="logs"  
>                prefix="localhost_access_log." suffix=".txt" pattern="common"
> resolveHosts="false"/>
>         -->
>       </Host>
> ---------------------------------------------------

You can see above an example of how to use the AccessLogValve, though
this will log accesses to the entire Host, not just your web application.

Glad you got everything working.

Good luck!
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkt9zicACgkQ9CaO5/Lv0PAOGgCgwT9TkBtw8qfF3d1jqiihO+c0
EJ8AniEbX4zyi3bcII2oMT5/RvMIoNmg
=7/c7
-----END PGP SIGNATURE-----

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

Reply via email to