I have an Web application developed using Spring3. Some functions of Web app needs to be exposed as Web services also.
Web app is deployed in the Tomcat Server as a .war file.
I have gone through Axis2 and Spring integration in the site http://axis.apache.org/axis2/java/core/docs/spring.html. What I am unclear is how the final structure looks like. Need clarifiaction on the below points,
1) What should be the directory structure of my final app for "With ServletContext" as well as "Without ServletContext" ?
2)The .aar file also should be placed in WEB-INF/lib directory? If so how does axis2 recognize this as service as it has compulsion on the directory structure like .aar file and inside it META-INF which contains services.xml. and the classes at the same level as META-INF folder.
I am not sure if I am going wrong in getting the whole picture. Any guidelines or a good tutorial would be highly helpful.
Related
I have a GWT GUI (getmap) application and i have placed it at \Apache Software Foundation\Tomcat 7.0\webapps directory.
Now when i am trying to open it using http://:8080/getmap/GetMap.html>, i am getting an error " Requested Resource is not available"
But when i copy same GWT GUI Application under \Apache Software Foundation\Tomcat 7.0\examples directory and load it using http://:8080/examples/getmap/GetMap.html>, everything works perfectly !!!
This problem is faced on Windows Vista.
I wold appreciate if anybody could provide some pointers to get rid of this issue ?
webapps contains WAR files or their exploded equivalent (i.e. a folder with a WEB-INF subfolder containing a web.xml file). The root of the server (served at the URL /) is a special webapp named ROOT.
So either create a ROOT webapp, or make getmap a webapp by adding the necessary WEB-INF/web.xml.
DISCLAIMER: the above is overly simplified and might not be accurate; plase check the Servlets spec and/or the Tomcat docs about deployment.
I developed a web application using java and mongodb. I used glassfish server.
I tried to deploy it on jelastic cloud service
I uploaded my war file. But when I run it after deploying the war file it shows a 404 error. Why? The project works fine on my machine.
There are at least few potential causes:
your app needs some resources which are not started by default (such as DerbyDB). In this case you can check GlassFish log file - server_instance.log for more details.
you are trying to get resources from wrong context, make sure you are trying to get it via correct context name
In JBoss 4.2.3 we could configure items in
[jboss_server]/deploy/jboss-web.deployer/conf/web.xml
which would be adopted by all applications deployed. We've used this to configure context params, servlets, and default tag files.
We have dozens of apps deployed in war files, and this a very handy tool.
How is this accomplished in JBoss 7.1.1? I've googled and searched but can't seem to find the solution.
You could try web fragments (part of Servlet API 3.x). You'll be able to apply the same set of filters, mappings, listeners, variables to each web app's context using one META-INF/web-fragment.xml file (inside some WEB-INF/lib/my-common-context.jar, so it'd be easily managed as a simple dependency).
I've got a mule-standalone server with an application I'm working on. Many of the services this application uses will be moved out of the Mule container into a JBoss cluster in the future. Because of this, I'm keeping a strong separation between the mule flows, and the Web Services. However, as of right now, I need to deploy the War file on the same server as my Mule application.
It seems like Mule should be able to run my War within it. Does anyone know if this is possible? I'm OK with adding a War into the Mule deployable zip for the time being, but would also like to deploy the war separately.
Mule ESB is not a standard Java EE container so it won't be hable to handle directly WAR files. In fact mule applications have the following structure:
/
\- classes // application-specific resources(e.g. logging config, properties)
|- lib // application-specific jars
|- mule-config.xml // Main Mule configuration file, also monitored for changes
|- mule-deploy.properties // Application deployment descriptor (optional)
|- mule-app.properties // custom properties to be added to the registry instance used by the application (optional)
as better explained here:
http://www.mulesoft.org/documentation/display/MULE3USER/Application+Format
What you can do is leverage the mule jetty connector to expose your web application. Your connector configuration will look like the following:
<jetty:connector name="jettyConnector">
<jetty:webapps directory="${app.home}/webapps" port="8083"/>
</jetty:connector>
and you will be putting your war files into the webapps folder. You can use the bookstore example as a reference:
http://www.mulesoft.org/documentation/display/MULE3EXAMPLES/Bookstore+Example
I have a wcf service application that has some application startup code in the app_code folder of the project. When i publish this project to my website, it deploys it with source code and app_code folder.
Is there a way to precompile the wcf app ( like an asp.net app), that includes all the dependencies and compiled code ?
i checked the web deployment package files, and even that has the source code of app_code folder.
problem here really is that since the template for wcf does not expect app_code folder and .cs files in it, they get added as content, changing them to compile would include them in the web dll
Your best bet would be to:
put all your WCF service-related code into a separate class library assembly
deploy that assembly to the .\bin directory
only put your MyService.svc file (without any code-behind) to your virtual directory
With this setup, the WCF service is still being hosted by IIS, but you don't need to do any special tricks and hacks to get it to work properly.