You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Zsolt Koppany <zk...@intland.com> on 2000/12/17 17:06:47 UTC

Adding authentication such as JDBCRealm dynamically

Hi,

is it possible to add authentication such as JDBCRealm dynamically? I
would like to add authentication for example only when the request comes
from outside of the company.
-- 
Zsolt Koppany
Intland GmbH www.intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Tel: +49-711-7871080 Fax: +49-711-7871017

Re: Adding authentication such as JDBCRealm dynamically

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Zsolt Koppany wrote:

> Hi,
>
> is it possible to add authentication such as JDBCRealm dynamically? I
> would like to add authentication for example only when the request comes
> from outside of the company.
>

Container-managed security is normally based on matching the Request URI against
the patterns defined in your security constraints, not on where the request came
from.  You would need to write a custom RequestInterceptor (Tomcat 3.x) or Valve
(Tomcat 4.x) to impose this kind of a rule.


> --
> Zsolt Koppany

Craig McClanahan



Need Some help..

Posted by Thyagesh <th...@hotmail.com>.
 Hi,
        I know its stupid. But I really struck with Tomcat's Docs & can't
figure how to configure it. I had used JServ extensively. I had to migrate
to Tomcat since I need a Servlet Container to Connect to IIS in Windows.
       My Requirements are that I had to Run Servlets which are in packages.
Hence I need mappings to these servlets. Also I need different context Paths
to same set of code(ex: /servlet, /foo) like zones in JServ.
    Thing I want to know whether I had to create a WAR file to make it work
. OR Just add code to /webapps/root/.../classes(then where would be
mappings??).
    I had seen docs but couldn't figure out

    Any Help will be really useful. Please..

-Thyagesh




Common Tomcat Installation Bugs Fix in Windows OS

Posted by "isu:jwkoh" <jw...@ilstu.edu>.
These are all the errors I encountered and fixed overnight during Tomcat
installation. ):-(

1. Error Message, "Out of environment space:" --> right click on startup.bat
and click on property and click memory tab and choose initial environment
drop-down box and choose 2048 or bigger. It doesn't have to be 2048+ but a
bigger number has the better chance of working. You can choose property by
clicking the top left corner of the console window.

For reference, I saw in a website a guy says - To solve the 'Out of
Environment Space' error you must edit CONFIG.SYS (again, the old MS-DOS not
so defunct operating system presence). You must add the following line:
SHELL=C:\COMMAND.COM /E:8192 /P
please replace C:\COMMAND.COM to the correct location if you moved
COMMAND.COM to another location. The "/E:8192" allocates 8k to be used by
environment variables. The maximum allowed is 32k (35736). The last
parameter, "/P", is used to make this COMMAND.COM instance resident in
memory and owner of main environment space (from which every process
receives a copy).

2. Error Message, "only DOS 8.3 names may be used in TOMCAT_HOME!"--> You
are using Windows Explorer folder name find dos name of the folder(=
directory) using DIR command in DOS console. If you have long dir name in
windows explorer such as "jakarta-tomcat-3.2.1", it will show up as jakart~1
in DOS. Use this 8 character long name.

2a. Use simple folder(=directory) names for JDK(=J2SDK 1.3) and TOMCAT. I
used default names "j2sdk1.3" and "jakarta-tomcat-3.2.1" They caused
conflicts in *.bat files when starting tomcat. Especially DON'T USE "." in
those folder names. USE 8 characters-long name, or find matching DOS DIR
name for the windows explorer long folder names. So I uninstalled and
reinstalled JDK in the folder,"j2sdk" and tomcat in the folder, "tomcat".

3. Common and Hard-to-find ERROR: Type in SET JAVA_HOME=C:\JDK in the first
line after REM lines (REM lines are comment lines so they are ignored in
execution)in startup.bat file. ***** VERY IMPORTANT NOT TO HAVE SPACES
before and after "=" *****



Re: Tomcat 3.2 - getRequestDispatcher().forward

Posted by Matt Goss <mg...@rtci.com>.
G,
I'm not totally sure, but you may want to try renaming the subdirectory to
something other that admin (Apache may be picking it up as a call for its
mapping of /admin/ to the admin webapp...
Matt

Graeme Wallace wrote:

> So its a bug in 3.2 then.....
>
> -----Original Message-----
> From: Matt Goss [mailto:mgoss@rtci.com]
> Sent: Monday, December 18, 2000 8:24 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Tomcat 3.2 - getRequestDispatcher().forward
>
> Graeme,
> No, the forwarded request is treated as the same request.
> Matt
>
> Graeme Wallace wrote:
>
> > Hi,
> >
> > Is the behavior of getRequestDispatcher(pagelocation).forward(req,res)
> > supposed to interpret
> > the page location as if it was a new request to Tomcat ?
> >
> > ie. if I have a webapps that has an admin subdirectory and I want to
> forward
> > to its
> > index.jsp, I used to do
> > getRequestDispatcher("/admin/index.jsp").forward(req,res)
> >
> > but if i do that with Tomcats default admin webapp still configured it
> gets
> > the forward
> > to process instead of tomcat picking up the file.
> >
> > regards,
> >
> > G.

RE: Tomcat 3.2 - getRequestDispatcher().forward

Posted by Graeme Wallace <gw...@houston.rr.com>.
So its a bug in 3.2 then.....

-----Original Message-----
From: Matt Goss [mailto:mgoss@rtci.com]
Sent: Monday, December 18, 2000 8:24 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: Tomcat 3.2 - getRequestDispatcher().forward


Graeme,
No, the forwarded request is treated as the same request.
Matt

Graeme Wallace wrote:

> Hi,
>
> Is the behavior of getRequestDispatcher(pagelocation).forward(req,res)
> supposed to interpret
> the page location as if it was a new request to Tomcat ?
>
> ie. if I have a webapps that has an admin subdirectory and I want to
forward
> to its
> index.jsp, I used to do
> getRequestDispatcher("/admin/index.jsp").forward(req,res)
>
> but if i do that with Tomcats default admin webapp still configured it
gets
> the forward
> to process instead of tomcat picking up the file.
>
> regards,
>
> G.


Re: Tomcat 3.2 - getRequestDispatcher().forward

Posted by Matt Goss <mg...@rtci.com>.
Graeme,
No, the forwarded request is treated as the same request.
Matt

Graeme Wallace wrote:

> Hi,
>
> Is the behavior of getRequestDispatcher(pagelocation).forward(req,res)
> supposed to interpret
> the page location as if it was a new request to Tomcat ?
>
> ie. if I have a webapps that has an admin subdirectory and I want to forward
> to its
> index.jsp, I used to do
> getRequestDispatcher("/admin/index.jsp").forward(req,res)
>
> but if i do that with Tomcats default admin webapp still configured it gets
> the forward
> to process instead of tomcat picking up the file.
>
> regards,
>
> G.

Tomcat 3.2 - getRequestDispatcher().forward

Posted by Graeme Wallace <gw...@houston.rr.com>.
Hi,

Is the behavior of getRequestDispatcher(pagelocation).forward(req,res)
supposed to interpret
the page location as if it was a new request to Tomcat ?

ie. if I have a webapps that has an admin subdirectory and I want to forward
to its
index.jsp, I used to do
getRequestDispatcher("/admin/index.jsp").forward(req,res)

but if i do that with Tomcats default admin webapp still configured it gets
the forward
to process instead of tomcat picking up the file.

regards,

G.