top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Tomcat: Web filter to forward some requests to another remote webserver

+2 votes

I would like to create a web filter to forward some requests to another webserver,

The filter receives an "application/x-www-form-urlencoded" request , inspects the value of a parameter and chooses to forward to another remote webserver ( as a proxy )

I've seen some posts where they open a HttpURLConnection to remote server and send the request. This is right for me, but I'd would like if there is another way ( easier ) to implement it.

posted Jan 14, 2015 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+3 votes

I have a requirement where the tomcat load has to be managed by tuning the following parameters.

--> Limit the number of user requests at Apache level that are routed to Tomcat server.
--> Track the number of processed requests and the requests that are queued at Apache level.

Any suggestions?

0 votes

I'm using Tomcat6 on my web application which is running on Windows Server 2003 Standard Edition. I want to access static files (PDF) in the remote directory on the disk server (NetApp) through http address from web browser. I tried to use Windows shortcut, but It didn't work. Seems that Tomcat recognize a shortcut as a common file (.lnk) instead of a soft link. How can I access it properly through http in the IE browser?

I can only access the files if the static files are put in the local disk. I tried to use hard link and junction, but they work only on the local disk (on the same computer). I tried to modify context.xml, but it didn't succeed.
Most of the solution in the internet is a soft link from local disk to local disk.

+1 vote

I was just wondering, if we do have a method to perform remote deployment.

I did take a look at the code for the Tomcat deployer and as per my understanding, it performs a HTTP PUT request, with the deployment file, to the Manager application to further perform the deployment.

If for some reason, the Manager application is / can not be deployed, is there still a way to achieve remote deployment on to Tomcat? Or is it a must, that we must be having Manager application deployed to deploy applications remotely?

+2 votes

My webapp have a set of resources, let's call that set R. Some of those resources need to be accessed only from certain source IP addresses, let's call that subset R'. And some subset of R' (let's call it R'') needs authentication.

I have a requirement to check source IP address before authentication.

Right now, R' is specified in web.xml RemoteAddrFilter s, and R'' is specified in web.xml s.

The problem is, filters are executed after container-managed authentication, so login form is presented to the user before RemoteAddrFilter kicks in, and check source IP address. That is not what I need. Users outside trusted IP ranges should not be able to even know about the protected resources, let alone to guess passwords.

RemoteAddrValve, on the other hand, is called before container-managed authentication, but it does not allow specifying s.

What would be a good solution for the above requirement? Extend RemoteAddrValve with the ability to specify s?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.