Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to create web proxy . I googled it and even found some tutorial but those were in PHP.
If somebody is having tutorial of web proxy creation in java then please post it here Or simply let me know what approach should i follow to create web proxy. [ i will be using Tomcat { if that matters for your answer } ]
Thanks
Edit
i guess i was not clear in stating what i require. Actually i am trying to develop a site like 'http://proxyug.com/' .
JSocks is a SOCKS proxy server written in Java.
http://jsocks.sourceforge.net/
Have you tried Java Proxy servlet. It's web proxy such as php or glype, but written in java as a servlet
This is simply the method you'd use to create a proxy server. Not sure exactly why you refer to doing it 'in java' but based on the information below you'll just need to configure the appropriate settings for mod_proxy and would probably be better off asking this question on ServerFault:
From The Apache Tomcat 5.5 Servlet/JSP Container
Proxy Support HOW-TO
Apache 1.3 supports an optional module
(mod_proxy) that configures the web
server to act as a proxy server. This
can be used to forward requests for a
particular web application to a Tomcat
5 instance, without having to
configure a web connector such as
mod_jk.
http://tomcat.apache.org/tomcat-5.5-doc/proxy-howto.html
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I've been able to get an existing application mostly working under Quarkus. The original application uses Undertow and RESTEasy and all endpoints use mutual TLS. Working with Undertow directly, it's relatively straightforward to get mTLS working. But doing the same is Quarkus is not so obvious.
I'm intrigued by what Quarkus is doing, but it seems to lack lower-level access to some of the internals for situations like mTLS and likely other scenarios. Is this type of configuration workable today, is it planned, or is that type of use case not part of the Quarkus charter? Part of me feels like creating a custom Undertow extension, but it would be a lot simpler to simply extend the existing extension. Any pointers are greatly appreciated.
I'm just trying to figure this out, too, and while this isn't mentioned in any Quarkus guide, the configuration options are there:
https://quarkus.io/guides/all-config#quarkus-vertx-http_quarkus.http.ssl.certificate.trust-store-file
https://quarkus.io/guides/all-config#quarkus-vertx-http_quarkus.http.ssl.certificate.trust-store-password
https://quarkus.io/guides/all-config#quarkus-vertx-http_quarkus.http.ssl.client-auth
I implemented a quickstart sample around Mutual TLS with Quarkus.
On server side, the properties to enable are:
SSL configuration
quarkus.ssl.native=true
quarkus.http.ssl.certificate.key-store-file=...
quarkus.http.ssl.certificate.key-store-password=...
Truststore configuration to validate the Client certificate
quarkus.http.ssl.certificate.trust-store-file=...
quarkus.http.ssl.certificate.trust-store-password=...
Activate client configuration
quarkus.http.ssl.client-auth=required
On client side, because Quarkus uses MicroProfile Rest specification, you need to define the following properties:
Server endpoint
org.acme.restclient.tck.GreetingService/mp-rest/url=...
Truststore configuration
org.acme.restclient.tck.GreetingService/mp-rest/trustStore=...
org.acme.restclient.tck.GreetingService/mp-rest/trustStorePassword=...
Client certificate
org.acme.restclient.tck.GreetingService/mp-rest/keyStore=...
org.acme.restclient.tck.GreetingService/mp-rest/keyStorePassword=...
You can find everything on https://github.com/openlab-red/quarkus-mtls-quickstart
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am building an android app and i have following doubts:-
I need help in how to create back end that is server (application layer).(I am good in java . so if you could guide me a way using java that would be nice)
I need know how to connect the server to my app both on app and on server side.
It depends on you're needs but you're best bet is using something like Django, Ruby on Rails or Python.
Building Awesome Rails API's Part 1
If you want to use Java, there are more ways. Here is one of them (pretty common these days). Your backend app could be a spring based and use REST controllers as the endpoints. There are plenty of introductions, e.g. http://spring.io/guides/gs/rest-service . Once you have established and run the backend app (either deployment to a web server or spring boot - see http://spring.io/guides/gs/spring-boot/) you can connect to the server via TCP/IP. Your android app could use http-client.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to Webservices. We got WSDL files and we need to call its web service using IBM port lets. Someone plz help me on this.
First you need to know to basic idea behind Web Services and how it works:
A short introduction to Web Services
Then, you need to generate Java classes from the given WSDL file:
Creating Java Classes from WSDL file using Apache Axis 2
Generating Java code from a WSDL document
Note: The reference given using Apache Axis 2. There are others ways to do the same task this one of them.
Also, you need to deal with Certificates issue. I can not tell much about it. Since, it depends on your case.
Now you can work with your Java application, where you need to establish SSL connection, send requests and receive response from the Server you are requesting services form it.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
Actually I have a Java application running on a Linux server as daemon. Now I'll provide a simple web-based configuration page. I have no clue how to solve this without using big frameworks.
What I fell that I don't want is to use Java EE or sth like this. A "small" free (for commercial use) library is ok.
Any ideas?
I would recommend you to use Jetty(it is probably most Java lightweight server) with pure Servlets and JSP. If you need only one or two pages with few configuration options then any framework seem to me like unnessecary overkill.
I can recommend play framework if you want to stay in the java space or if you are adventurous you might consider any number of microframeworks/environments in other languages.
flask(python)
scalatra(scala)
meteor.js(javascript)
node.js(javascript)
twisted(python)
sinatra(ruby)
All of these offer very lightweight web servers(Often allowing you to create dynamic web content in just a few lines) in conjunction with languages that have os integration that will allow you to manage the configuration and status of your application.
You can use Apache Tomcat or Jetty.
Look into com.sun.net.httpserver if you are using the jre. It's already there any very easy the embed.
For configurations you can also use JMX. The jconsole can easily access your application and there is also a JMX HTTP adapter. This adapter allows you to monitor the setting and also change them. This gives you a web page for free but of course its not a "pretty" page.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am assigned to implement (or better configure) a kind of http proxy server. The server should support processes like described below:
-A user opens an URL in his browser which has the following structure: http://:/resource_name
-Proxy server validates the resource name in the URL of the incoming http-request and determines the URL of a web-resource it should forward the original request from the client to
-Proxy server forwards the original request, waits until it gets an answer from the external web-server, and posts it back to the user
I'm working within java, but I wouldn't like to implement a proxy server by myself playing with sockets. Instead I'd like to use an apache http server. Does anybody know if its possible to accomplish such a task on the configuration level using apache http server? If so, how?
Thank you in advance for your answers!
You can do this in Apache using the modules mod_proxy (to proxy your requests forward) and mod_rewrite (to map your external URL to the URL on your application server)
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
Apache is not written in java. Your chances are good with Tomcat or Jetty.
You will need to implement a webapp with a Servlet intercepting all requests and then handle all your custom logic in the Servlet.