Url to access azure webservice after deployment - java

When I access my web service running on tomcat on my local mahine, I can accesss it,say,
http://localhost:8080/UserManagement/something/users
But after I have deployed it to Azure, I am not able to access it if I do,
http://example.azurewebsites.net/UserManagement/something/users
I get resource not found !! Am I making a mistake?
Edit: I created my web service on Eclipse as a dynamic web project and ran it on tomcat. Then I uploaded it successfully on Azure as a web app using Azure plugin for Eclipse.

#Rorschach, According to your web service url, I think you have refered to the article Create a Hello World Web App for Azure in Eclipse deployed your dynamic web project on Azure via publish as Azure Web App in Azure plugin for Eclipse.
To troubleshoot for the webapp, please check whether your project deployment named UserManagement had been deployed at the path site\wwwroot\webapps via Kudu console which can be access via url https://example.scm.azurewebsites.net/DebugConsole.
If the directory UserManagement doesn't exist at the path wwwroot\webapps, I suggest that you can export the project as a war file and deploy it via drag into the webapps path using Kudu console or upload with ftp, then restart the webapp and try to access again.
If the directory webapps doesn't exist at the path wwwroot, I suggest that you can configure the Java web container at the Application Settings tab on Azure portal and re-deploy it.
Hope it helps. Any concern, please feel free to let me know.

Related

Unable to access web application by using ip address instead of localhost

I have created a web application using Eclipse.
While creating the project I have added Tomcat server. Then I ran my application and it worked.
Afterwards I installed Apache Tomcat service by executing the service.bat file through the command line and in the properties I have set startup type to automatic.
Now I can see the Tomcat in services tab but when I tried to access my web page by using my IP address (http://192.168.x.x:8080/myroom/) I am unable to access it.
I am getting the following error:
http:status:404 error - The requested resource is not available
But when I stop the service in task manager, open Eclipse and run my application on server I'm able to access my web page.
Why am I unable to access my web page by starting the service in task manager and then by using IP address?
Eclipse uses a different deployment directory.
You have to deploy your web application in Tomcat server. Just copy your .war file to TOMCAT_HOME/webapps.
Your eclipse tomcat differs from standalone one in web app folder location
When running from eclipse it is .workspace/eclipse wstd core etc... , when running from standalone usually it is somewhere on Tomcat folder

Netbeans does not give me wadl file

I'm trying to deploy a RESTful application with Netbeans to a remote server (with domain name "agdata.se") by following this guide. Once I've built and deployed, then entering the url "http://agdata.se:8080/WebTest/test-resbeans.html" I get the following error message:
"Cannot access WADL: Please restart your RESTful application, and refresh this page."
When I look in the project folder and unzip the war file, there's no wadl to be found. It's like Netbeans never created one.
I created the project (let's call it project A) using dedicated folders. I choosed Java EE 6Web and JavaServer Faces as the framework. I didn't configure the framework so I didn't choose PrimeFaces or any other of the components.
I then made a "RESTFful web service from a database" by rightclicking the project node. I created the datasource, just like the guide said, since I use a MySQL-database and not a Derby.
I left "Generate Named Query Annotations for Persistent Fields" checked.
I didn't check "Use Jersey Specific Features".
Then, I created another Web Application, also with Faces as framework. Letäs call this project B.
I run "Test RESTful Web Services" and check "Web Test Client in Project". I then choose project B and I can deploy and build it without any errors. I then enter the REST-test url into Firefox and it says it cannot access the WADL file. Again, there is no such file in the project folder when I look into the war file. Just to be clear, this is a remote server I'm deploying to, not localhost. The server is Ubuntu 13, I'm on a Mac OSX.
Thankful for all the help I can get!

How to upload a eclipse dynamic web project to a live server?

I have developed a dynamic web project using eclipse and i am having a domain name and a web hoster. all i want to do is to upload my eclipse project to my web hosting site. Currently i am using html 5 template on my website but i want to upload my own project on it. I have heard that we can do it by using war file but i am not sure how to do it as my html 5 template contains many html page like index.html and it is more in size as compare to war file which i have exported. Please tell me i am totally clueless about it
Your web host needs to support Java and some Servlet container. If they don't already have those two things installed, you'll need to install them yourself. Once that is done, in Eclipse, you will need to export your project in the form of a .war file and place it in the appropriate folder of your Servlet Container. For example, with Tomcat, you would place it in its /webapps directory. You then start your Servlet Container. Your web application will be up and running.
If your web project includes Java web technologies such as Servlets and JSP, you will need to
Build your war file first either with Ant, or Maven.
Then you can upload the war file to your web server using some type of deployment tool that is usually available on the hosting web server. For Apache Tomcat for example, you can use the Tomcat Manager tool to deploy your war file.

how to host java website which is developed in red hat 5 using notepad and not using Eclipse or any IDE

During my college time i have developed a java website in red hat 5 ,
On tomcat server with mysql as DB.
I havent use any IDE (Eclipse,NetBeans etc) for it.
I have developed it using notepad.
I have no clue of deploying any java website.
I tried importing my java website in the eclipse but it was giving lots of errors.
If anyone can help me that will be great !!
Please get my project folder on below link:
https://jumpshare.com/b/ppGP9oibkrTvVLtw9YxW
I had this directory in my Tomcat folder.
Please help.
If you just want to run the web app on your local server :
Install Tomacat.
Copy the ty154 folder to the web app folder
Start tomcat. If your code was working, then it will show up at something like the following url
http://localhost:8080/ty154/
If you just want to run the web app on a tomcat hosted server by uploading your web app folder :
Copy the ty154 folder to the web app folder.
Assuming that your hosting url is
http://neer.hosting.com/
then goto the following url
http://neer.hosting.com/ty154/
For some of the hostings you might have to restart your tomcat server.
Deploying using war files :
Also some of the hostings have some special ways to deploy. They might ask you to upload your WAR file. Here are the commands for generating the WAR file.
cd /to/your/folder/location
jar -cvf my_web_app.war *
Mostly uploading the WAR file to the web app folder on the remote hosting should suffice. Only thing is that you might have to restart your tomcat server.
NOTE : Some of the free hosting have their own steps for deployment. Refer to their deployment help documents. It will help you better.

steps for adapt eclipse dynamic web project to have a site in real server

I wrote a small servlet and jsp project on eclipse and tomcat 5.5, but I don't know with works I do for make that a real site on a real host. Should I war them or I should upload project on host? My host should have which properties? I really don't now how to start?
I would recommend packaging them in a war and deploying it out to the remote tomcat server. Its not a good idea to deploy an unpackaged project directly to the server unless your debugging or testing. Once you have a finished project ready to deploy package it to a war. I typically deploy to server using the tomcat manager page. Just browse for the war, click the upload button and it should start right up. On my local machine this is the url that I use to upload to the server http://localhost:8080/manager. The server itself should have the same properties and settings that you are using in your eclipse workspace, and I would highly recommend that it be the same version as well. The war can also be dropped into a directory on the remote host and Tomcat will load this on startup, this location will vary depending on the host.

Categories