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
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "regarding proxy configuration" Watch "regarding proxy configuration" New topic
Author

regarding proxy configuration

nikhil govind
Greenhorn

Joined: Mar 08, 2011
Posts: 28
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: 12513

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.


One of the most odious afflictions that Business has inflicted on the modern English language is "pro-active". Most of the time it's simply redundantly used in place of the simple old word "active". And a good deal of the rest of the time it means "You're not overworked enough yet, so go out and find more!"
nikhil govind
Greenhorn

Joined: Mar 08, 2011
Posts: 28
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
Saloon Keeper

Joined: Oct 27, 2005
Posts: 18376

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
How To Ask Questions How To Answer Questions
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 12513

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.
 
IntelliJ Java IDE
 
subject: regarding proxy configuration
 
Threads others viewed
Reading hyperlink in excel through Java
Google Mail
How to connect to the internet behind proxy ?
document opened through IE it is working fine but other browser giving error
How to connect to a machine residing behind a proxy server from an outside machine
developer file tools