Is Web.xml file required when using glassfish web server? - webserver

Do we need to add web.xml file when we are using glassfish web server? but in tomcat we don't need to add web.xml file. Is this correct? Asking as Im getting an error when i don't add web.xml file in glassfish.

Related

Can a sub-web.xml be deployed in jboss application?

I am converting a glassfish web application (.war) to be able to deploy it on a jboss (wildfly) server.
The original glassfish .war contains a sun-web.xml file. I am simply wondering if I'm required to convert the sun-web.xml file before it can be added to the equivalently converted jboss war.
Stated another way, is the sun-web.xml file compatible with only glassfish servers, or it is also applicable/compatible with jboss?
Thank-you kindly

How to port application glassfish to tomcat?

I have rest services using net beans and glass fish application server. How can i deploy same war file on tomcat web server.
I have tried to deploy same war on tomcat but it is giving 404
This is the procedure.
Copy the war file
Go to the folder named Tomcat (Path to your tomcat installation)
Then select webapps folder
Paste the war file into the webapps folder
Now open a web browser and type
http://localhost/YOUR_WAR_FILE_NAME
NOTE : I assume that you run tomcat on the default port which is 8080 plus your tomcat server is up and running.
Problem can be in web app descriptor. In Glassfish it is glassfish-web.xml but in Tomcat it is web.xml.
You should remove first and add second.

Not able to add the Spring jars into EAR under Tomcat Server. note :i added those in WEBINF/lib

i have added all the jars into WEBINF/lib but it is not added into my EAR,
When i add EAR to TOMCAT server i am seeing only one jar,
WEBINF/lib:
all my spring jars,
Tomcat V7.0
->MySpringExampleEAR
->only one jar
so i am getting below exception
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListner in eclipse-jee-kepler-SR2-win32.
I have tried by using Deplyoment assembly.Still am getting the same exception
Currrently not able to attach Image.
Can anybody please help me to resolve this issue?
Is there any solution other than MAVEN deploy for this?
Please read .war vs .ear file
Tomcat does not handle .ear files, only .war files.
If you are using Maven to create a web app that is intended to be deployed to Tomcat, do not use the maven ear plugin.

A war file created for weblogic server. Is that same war file work in WebSphere?

A war file created from weblogic server. Is that same war file work in websphere Server
Maybe. Depends on if any weblogic-specific features were used, or if you stuck to the servlet spec.

deploying a web service war file to websphere

I am trying to deploy a web service war file to websphere.
I have tested the web service in Eclipse using Tomcat and it worked. However, once I deploy the war file to Websphere, the service (as outputted in tomcat) does not display. In deploying to websphere, i checked the DEPLOY WEB SERVICES under the SELECT INSTALLATION OPTIONS.
When I created the war file from Eclipse, I right clicked the application and clicked export file, selected war file and there it went.
Was there something I missed in creating the war file? Or, in the deployment?
thanks.
Maybe too late?...See this case for a reasonable explanation.