Filtering remote host access from web.xml

2005-04-11 Thread Fredrik Jonson
Hello,

I want to limit access to a specific servlet based on the requesting clients 
host name and address. I'm aware of the RemoteHostValve, but as I understand 
the specification it can only be used by editing the server.xml file, and I 
would prefer to have a method to control it in the web.xml file.

Basically, what I'd need is a RemoteHostFilter, but i find no reference to a 
such a creature. Of course I could write one myself, but I cannot imagine that 
no one have had this problem before me.

So, what is a good approach on this?

(I'm using tomcat 4.1.31)

regards,
--
Fredrik Jonson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Filtering remote host access in web.xml

2005-04-11 Thread Fredrik Jonson
Hello,

I want to limit access to a specific servlet based on the requesting clients 
host name and address. I'm aware of the RemoteHostValve, but as I understand 
the specification it can only be used by editing the server.xml file, and I 
would prefer to have a method to control it in the web.xml file.

Basically, what I'd need is a RemoteHostFilter, but i find no reference to a 
such a creature. Of course I could write one myself, but I cannot imagine that 
no one have had this problem before me.

So, what is a good approach on this?

regards,
--
Fredrik Jonson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Undeploying without using manager?

2004-12-14 Thread Fredrik Jonson
Hello, 

I would like to stop and undeploy a webapp without restarting 
tomcat, and without using the manager application. Preferablely 
using a command line tool. How can I do that? 

I'm using tomcat 4.1.29. 

-- 
Fredrik Jonson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Undeploying without using manager?

2004-12-14 Thread Fredrik Jonson
On 2004-12-14, Shapira, Yoav [EMAIL PROTECTED] wrote:

  I would like to stop and undeploy a webapp without restarting
  tomcat, and without using the manager application.

 You can use the Manager through Ant, as illustrated in the Manager
 how-to doc.  But if really don't want to use the Manager at all, and
 don't want to restart Tomcat, go write your own undeployment mechanism.

In this case, the manager app isn't installed at all (security 
precaution), I probably should have mentioned that. And writing 
my own deployment mechanism seems like way over my head right now. 
At lest I know I haven't missed anything obvious. 

Thanks for the input.
-- 
Fredrik Jonson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Servlet mapping for root directory in a webapp?

2003-08-14 Thread Fredrik Jonson
Following up to myself here... 

On Thu, 7 Aug 2003, Fredrik Jonson wrote:

 I'm trying to get tomcat (from sun's jwsdp1.2) to do a default mapping. 
 
 I (and a lot of other people, apparently =) have tried:
 
 servlet-mapping
 servlet-nameMainView/servlet-name
 url-pattern//url-pattern
 /servlet-mapping

Today I changed it to:

 servlet-mapping
 servlet-nameMainView/servlet-name
 url-pattern/index.html/url-pattern
 /servlet-mapping

And, as I understand it, tomcat(?) returns that servlet mapping for
requests for the root catalog. Well, it is a kind of workaround, but
since it works well enough I'll just accept that and continue. 

But if anyone know more about the magic behind it all, I'd be very
greatful for a thorough explanation of how and why it works. 

TIA  regards, 
-- 
Fredrik Jonson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet mapping for root directory in a webapp?

2003-08-07 Thread Fredrik Jonson
Hello, 

I'm trying to get tomcat (from sun's jwsdp1.2) to do a default mapping. 

Ie, in my webbapp /stuff/ I want to get a servlet to serve the root 
page. As I understand it there is a default servlet that serves 
static content, I do not want to replace that one, but only load a
specific servlet for the root url for my webapp.

I (and a lot of other people, apparently =) have tried:

servlet-mapping
servlet-nameMainView/servlet-name
url-pattern//url-pattern
/servlet-mapping

as I found it on a lot of search results, but as I understand it
that pattern is already taken by the default servlet. It doesn't
work.

I have had little succes searching google, and the documentation for 
solutions. Is it at all possible, or does everyone just use a dummy
index.html in the root directory and forwards the users to the real
content serving servlet? 

TIA
-- 
Fredrik Jonson


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Security manager, velocity and logging - access denied

2003-02-09 Thread Fredrik Jonson
Hello, 

I'm a tomcat newbie running debian and trying to use tomcat 4.0.3-3woody2 
and velocity-1.3.1-rc2. So far I haven't managed all that well. =)

If I disable the java security manager everything works fine. But I 
kinda figure that the security manager is there to serve a purpose.
I would really like to have it activaded and not less strict than
necessary.

When I enable it I get the following error, probably caused by the
combination of some automatic(?) logging in velocity that haven't got
the correct access rights in catalina.policy:

  Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error
exception
javax.servlet.ServletException: Error initializing Velocity: 
  java.lang.Exception: Unable to configure AvalonLogSystem: 
java.security.AccessControlException: access denied
(java.io.FilePermission /var/lib/tomcat4/webapps/ROOT read)
at org.apache.velocity.servlet.VelocityServlet.initVelocity(
 VelocityServlet.java:236)
[snippage]  

I have tried random (doh!) changes in the policy, but without much luck. 
I'll be greatful to get some hints... What are good default grants for 
webapps using velocity?

TIA  regards, 
-- 
Fredrik Jonson
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]