Azure web api with java - java

[Update: Problem Solved, Clear solution unable to be achieved. More information in comments]
I am new to azure and I am attempting to create a API Application following the tutorial found here https://azure.microsoft.com/en-us/documentation/articles/app-service-api-java-api-app/
Everything works fine on the local machine but when I attempt to push it to the live site and do a Postman request for http://talkapi.azurewebsites.net/api/contacts/2 I get resource not available.
I don't know what bugging tools I have and where to start. I was wondering if anyone had some advice on where to start debugging or what the problem is.

According to the tuturial and per my experience, it seems that the issue of 404 not found was caused by the incorrect deployment on Azure.
Please access the link https://talkapi.scm.azurewebsites.net/DebugConsole the Kudu tool of your API App and move to the path D:\home\site\wwwroot\webapps, then you will see the fig below.
Try to drag your ROOT.war file and drop here (\webapps), and tomcat will auto-decompress the war file and replace the directory ROOT, then you can try to request the api http://talkapi.azurewebsites.net/api/contacts/2 again.
Kudu is the engine behind git deployments in Azure Web Sites includes Azure API App, you can see more detals at https://github.com/projectkudu/kudu/wiki.
Hope it helps. Any update, please feel free to let me know.

Related

Azure, default "Hey, Java developers!" welcome page after successfully deployment

After succesfully deployment via Github repo of my Spring boot Application in Azure's App Service i have still "Hey java developers!" page, i tried do this via Github and Github Actions, Github and Kudu, FTP, but result is allways the same. I'm out of ideas.
UPDATE
Today, I try again. I disconnect connection. And try to reconnect, I saw build area like below.
After Action completed, it works.
So I suggest you disconnect and reconnect to solve the problem.
PRIVIOUS
According to your description, I personally tested one side and your problem reappeared.
My troubleshooting steps:
First create a default page for webapp. (Under windows, it fails, indicating that this is not).
Deploy the webapp under linux and find that everything is normal.
From the Action on github, it was found that there should be a problem with the build in the deployment under windows.
In conclusion:
It is recommended to use linux to deploy webapp. As for the deployment failure under windows, it is recommended to raise a support ticket for help.
My test result.
Under Linux, after build action, we can see app.jar file under wwwroot folder.
I also move it to windows webapp, it doesn't work.

How do I get Apache and tomcat docker containers to talk to each other?

I am a total newb at this and I want to learn. I have a webapp running in a docker container currently on Ubuntu 16.04TLS. I can connect to it over the Internet and it works fine. I want to run an Apache frontend in a separate container and enable SSL. I worked on this for 8 hours today and I know I was close. I had to restore the VM in the end so i could put the webapp back online.
I followed this tutorial https://medium.com/#jmarhee/running-multiple-web-applications-on-a-docker-host-with-apache-85f673f02803 and was successful at being able to connect to Apache (I got the default home page with the install) but was unable to get Apache to proxy for Tomcat. I got a 503 error when I enabled the proxy pass through. I am all about reading if you folks are good with pointing me in the right direction. Since I want to learn, I may come back with more questions. I did read another article http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach but I did not understand how to apply it to my situation.
TIA for any help you can provide me with.

cPanel with Tomcat 7 installation successful but not showing /usr/local/jakarta folder under root

I have successfully installed Tomcat 7 using cPanel on IWEB server. I got the installation successful message too. I am able to hit the tomcat home page using www.domain.com:8080 and it directs me to Tomcat's home page. You may take a look at http://67.205.89.174:8080/
The main challenge is, in order to access Manager App, I need admin credentials, which should ideally be found in /root/usr/local/jakarta/..../tomcat-users.xml
When I connect to 67.205.89.174 using WinSCP, I don't see any "jakarta" folder located there.
This is my first time I am trying to host a website and everything is new to me. I am doing my self study by going through some online documentations, blogs, videos etc.. related to cPanel-Tomcat 7 installation.
I would appreciate any help by guru's online here so that it can drastically save my time.
Thanks in advance!
Tomcat 7 configuration directory is /usr/local/easy/share/easy-tomcat7/conf and you can check your user configuration in /usr/local/easy/share/easy-tomcat7/conf/tomcat-users.xml file.

Deploying example application

I am trying to deploy the example form based authentication application to my glassfish server, but everytime I launch the application, I am redirected to yahoo, saying that
The requested URL "http://localhost:8080/com-byteslounge-jaas/" cannot be found or is not available. Please check the spelling or try again later.
Anyone have any ideas? I downloaded the source straight from here:
http://www.byteslounge.com/tutorials/jaas-form-based-authentication-in-tomcat-example
You can also launch Server Domain Console (http://localhost:4848 by default) and there, in Applications section, You should have Your app listed. You can see the URL to Your app either by clicking it's name or by clicking Launch link on the right.
The example in your linked article describe the URL is http://localhost:8080/com-byteslounge-jaas-1.0-SNAPSHOT, have you ensured you deploy the app to the same context path you're requesting? Check glassfish log to see what context path your app is deployed as

Has anyone gotten Recaptcha to run on the Google App Engine (in Java)?

I followed the recaptcha instructions and created a simple app that works if I run it in Eclipse using a local Tomcat server but the same files give an error (verify-params-incorrect) when validating the user's response when run in Eclipse using the local Google App Engine SDK.
Are you using the Java code linked to on the reCAPTCHA site? I took a quick look at it, and I suspect that the SimpleHttpLoader class uses some Java classes that are no allowed by Google's AppEngine.
So, here is what I know: Running locally, I get the same error as you.
But, when I deploy it to AppEngine, it works! For the forum posts I've read, I suspect it has to do with the remote IP address (127.0.0.1) when running locally.
This is sort of an impertinent answer, but are you sure you really need to pester your potential users with a captcha at all? There's a great article over on sitepoint entitled "10 Things to Check Before Using a CAPTCHA"
I had no problems at all locally with Google App Engine or deployed with recaptcha4j-0.0.8.jar and Google App Engine SDK 1.6.6. I followed the reCaptcha tutorial for Java at https://developers.google.com/recaptcha/docs/java.
Check here for recaptcha4j lastest version: http://code.google.com/p/recaptcha4j/downloads/list

Categories