Unable to run deployed application on glassfish server - web-services

I have successfully installed Glassfish on a Ubuntu 16.04 instance.
The deployment of my webservice is also succesfull, When I launch the application, I get a page that says
Web Application Links
If the server or listener is not running, the link may not work. In this event, check the status of the server instance. After launching the web application, use the browser's back button to return to this screen.
When I click on a link (both HTTP and HTTPS), I get a 404 error.
I presume that there must be something wrong with my server, but all tutorials about setting up a glassfish server seem to go straight out-of-the-box, so I don't get a clue why it isn't working in my case.
I also can't find where to check the listeners or server instance, and what they should be configured like.
Last thing to mention: I have never used glassfish before, I only need to test if a webservice is working like expected before sending it to a customer who will deploy it himself.

What directory structure do you use in your *.war file? By default static files (like index.html) should be placed in the root folder - not in the WEB-INF. So a typical directory structure would look like this:
myWebApp/
WEB-INF/
web.xml
lib/
MyLib.jar
classes/
mypackage/
MyServlet.class
index.html
index.jsp

I deploy a Web Service using REST and I have the same problem.
My structure is :
MyProject
.idea
lib
out
src
MyApp
Helloworld
web
web.xml
WEB-INF
index.jsp
MyProject.iml
External Librairies
I followed a tuto (https://www.jetbrains.com/help/idea/2017.1/creating-and-running-your-first-restful-web-service-on-glassfish-application-server.html#d76541e113) and I should have a web page on http://localhost:port/appArtefact/helloworld

Related

Does ember's dist output require node?

When you build an Ember application the output is placed in the dist folder. Can I take this output and stick it into IIS on a server without installing node? I understand that during development I need to have node.js installed. I'm asking if the production host server will require node.js if I'm hosting in IIS?
A built Ember application (the contents of the /dist folder) is composed of files that can be served statically, so there's no requirement for node.js.
You should be able to serve them with IIS without a problem, just make sure you configure the routes properly if you're using the history API (location: 'auto'/location: history).

Deploying Front End of Website to Azure

I am trying to deploy my web application and web service to Azure. I am somewhat new to web development and even newer to web app deployment.
When I test deployment on my local machine, there are 2 steps:
1) Publish web service from within VS. Copy generated folder to server's inetpub/wwwroot/ folder, convert to application from IIS manager. - I refer to this as the back end.
2) Host and run the web app. Run "grunt build" to generate a "dist" folder, copy dist folder into inetpub/wwwroot, create new site pointing to this folder in iis manager. - I refer to this as the front end.
I seem to have gotten step 1 done correctly in Azure: http://nxgnopencast.azurewebsites.net/ - published it to Azure from within Visual Studio.
My issue is step 2. What is the equivalent of grunt building and using iis manager to convert to website for Azure?
Try copying all of the content on your IIS website into the wwwroot folder on your Azure web app. This can be done easily via FTP or drag and drop on the SCM site: http://nxgnopencast.scm.azurewebsites.net/
On the SCM site go to Debug console > CMD and then use the folder structure to go to D:\home\site\wwwroot and drag and drop all of your content there.
For more deployment techniques see:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/

Trying to Use the InfoRecoverySample in IS 5.0.0

I'm trying t use the InfoRecoverySample in IS 5.0.0. I was able to build it as according to the instructions here:
https://docs.wso2.com/display/IS500/Recovering+Account+Information+Using+a+Webapp
However after placing the war file in [IS_HOME]/repository/deployment/server/webapps/ and restarting, I get errors in the application logs. Unfortunately they are very vague:
org.apache.axis2.deployment.DeploymentException: Error occurred while deploying webapp : [IS_HOME]/repository/deployment/server/webapps/InfoRecoverySample.war
Error occurred while deploying webapp : [IS_HOME]/repository/deployment/server/webapps/InfoRecoverySample.war
Error while deploying webapp: StandardContext[InfoRecoverySample.war].File[repository/deployment/server/webapps/InfoRecoverySample.war]
My best guess is that the pom.xml file is out of date because I see lots of references to 4.2.0. This is the pom.xml file I'm using:
https://svn.wso2.org/repos/wso2/people/chamathg/samples/is/InfoRecoverySample/pom.xml
Does it sound like I'm on the right track? If so, is there an updated pom.xml file (or sample project) out there?
TIA,
Mike
Deploy the war file in your tomcat/webapps folder, not the identity server webapps. then access via localhost:8080
edit:
The way the pom is designed is for deployment on your localhost, not the wso2 server. Despite what the instructions say. However, you can deploy it to [IS_HOME]/repository/deployment/server/webapps/ as long as you remove most of the jar files that are created in the war's WEB-INF/lib directory. These will conflict when being run from the IS. The only one you need to leave is org.wso2.carbon.identity.sso.agent-1.2.0.jar. remove, re-zip, and then redeploy.

ClassNotFoundError even though class is included in lib/ext folder in Jetty 9.2.2

Just want to ask about my problem. I am trying to setup a jetty server and included my own webapp. I put the web application in the webapp folder of jetty server. I also included the necessary libraries needed by the web application in lib/ext folder of jetty, it is not included in the war file. when i run the jetty server and access the webapp, i get the 'NoClassDefFoundError'.
I run the jetty server using the 'java -jar start.jar'. I am also sure that the jar file which contains the class that causes the error is in the classpath.
Did i miss something?
Thank you.

where to place clientaccesspolicy.xml file into the apache tomcat server deployed in eclipse IDE

I have a silverlight application and i want to call a apache cxf web service written in java in my eclipse and published on apache tomcat 7.0 through eclipse.
so now when i call this web service from my silverlight application from visual studio 2010 i get follwing error:
An error occurred while trying to make a request to URI 'http://localhost:8080/complesxtypeWebService/services/CompanyServicePort'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services
when i search for this on web i found that i need to place clientaccesspolicy.xml file in the root directory of domain service.
so my problem is where to place this xml file . can it be placed somewhere in eclipse project folder or somewhere in apache tomcat folder. please let me know where to actually place this file.
my all development are done locally and everything is being tested locally.
thanks
vicky
I placed the clientaccesspolicy.xml file in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT and it works for me.
Please note that this is Windows 7 PC and if I remove the file, I get the dreaded cross domain error.