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

Petr,

On 6/16/2009 4:03 AM, Hracek, Petr wrote:
> Now I have changed the files basely you mail and now situation is following:

You are getting closer.

> I am trying to develop a new servlet:
> 
> /opt/secm/servlet directory has WEB-INF structure with class file and web.xml 
> file.

Can you post the result of the following command:

$ find /opt/secm/servlet -print

That way we can see if everything is where it should be.

> What rights has to have directory servlet and all subdirectories.

The euid of the Tomcat process must be able to read and execute /opt,
/opt/secm, /opt/secm/servlet, and all other directories. It must have
read access to all files under /opt/secm/servlet.

> In the web.xml file is:

web.xml looks good, depending on how you want to deploy. Keep this line
of config in mind going forward:

>         <url-pattern>/SecM/servlet/SecMServlet</url-pattern>

[snip]

> In /etc/tomcat55/Catalina/localhost/SecMServlet.xml is defined:
> <Context docBase="/opt/secm/servlet"
>     crossContext="false" debug="0" reloadable="false" >
> </Context>

Assuming that your SecMServlet.xml file is properly loaded (log files
should confirm that this "context" (or webapp) is being loaded).

If you want to access this servlet, you'll need a URL like this:

http://host:port/SecMServlet/secM/servlet/SecMServlet

This URL is obtained by concatenating the "context name" (taken from the
context XML's filename, SecMServlet.xml, and removing the ".xml" from
the end) plus the <url-pattern> you assigned to your servlet in web.xml.
Given your original question, I think you probably want your setup to be
this:

(Your names have changed from sso and swt to SecM and stuff like this,
so it's tough to give you good advice, but I'll try.)

1. Use /etc/tomcat55/Catalina/localhost/SecM.xml as your context.xml
file. Do not make any changes to the contents of this file.

2. Change your <url-pattern> in your web.xml file to be this:

<url-pattern>/servlet/SecMServlet</url-pattern>

3. Change your mod_jk configuration to be:

   JkMount /SecM/servlet/SecMservlet ajp13

   (If you have multiple servlets, map them individually. If you have
    /many/ servlets that all match a certain pattern, feel free to
    just map the pattern like /SecM/servlet/*).

Now, the URL you will use to access your servlet will be
http://host:port/SecM/servlet/SecMServlet

Note that the <url-pattern> you use can be arbitrary... there's no
reason the word "servlet" needs to appear anywhere in that URL.

> After this configuration WEB browser show me: HTTP 400 - BAD Request

Could you post the whole error? Is there anything in the log files?
Often, you'll get a 400 when the context you're trying to reach has
failed to load for some reason.

> If the content file has the name SecM than I received HTTP 404 - The
> requested resource is not available.

Full URL please?

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

iEYEARECAAYFAko3oxEACgkQ9CaO5/Lv0PANtQCfSAC1bstKKOT+XIItkAen63F4
3+kAn0svN3gbT6IDFVaufWOkmqRqvnpJ
=j8aw
-----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