File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes regarding proxy configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "regarding proxy configuration" Watch "regarding proxy configuration" New topic
Author

regarding proxy configuration

nikhil govind
Ranch Hand

Joined: Mar 08, 2011
Posts: 31
HI All,

I have a web-application that is to be run on LAN. Now it uses the apache-tomcat. Again the lan had internet cooncetivity also via proxy server.
So i was suggested to start the sever by command prompt with proxy ip and port number.
Again it needed to be configured in catalina.bat file being used by startup.bat file. Now I do not know what syntax should be writeen there.
Any one please suggest me the format to be written in the JAVA_HOME line there present and also the command propmt arguments
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

I am confused here. A proxy server is usually run completely independently of the services it proxies and often runs on a completely different computer. So normally, the OS is configured to automatically start the proxy server at boot time, and Tomcat wouldn't be involved in starting the proxy server at all.


Customer surveys are for companies who didn't pay proper attention to begin with.
nikhil govind
Ranch Hand

Joined: Mar 08, 2011
Posts: 31
Hey its true the proxy server is different . But for getting internet we put internet options ...connections...lan settings ...proxy server ip and port number in internet explorer.got it ?
Now when tomcat server is run its uses default port 8080 without any proxy setup.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

If I get this straight you want Tomcat to use a proxy for connecting to other websites? If so, then check out http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html.
If I didn't get it straight, please tell us again what you want, but this time in a more detailed way.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

It sounds like what you really want is for Tomcat to somehow setup the proxy settings in people's web browsers.

Tomcat can't do that. You wouldn't want it to do that. If my webserver could reach across the Internet (or even across a LAN) and change proxy settings, I could silently set you up so that the next time you did a google search, the proxy that you were now configured for (and which I own), would serve up content from my own private porn and malware dispenser webserver instead of from Google.com.

Of course, even if such rude behavior was possible, it would be of limited utility, since IE is no longer the browser used by a majority of users and every brand of browser manages its internal settings differently. So the only place that you can do stuff like that successfully is something like a company LAN where everyone is forced to use IE. And in real life there are usually a few (but often very important) people who won't be using IE anyway.
 
Don't get me started about those stupid light bulbs.
 
subject: regarding proxy configuration
 
Similar Threads
How to connect to a machine residing behind a proxy server from an outside machine
document opened through IE it is working fine but other browser giving error
Reading hyperlink in excel through Java
Google Mail
How to connect to the internet behind proxy ?