How to configure address of WSDL URL in Apache Axis2? - axis2

I am using Axis2 and Tomcat8.5. My WSDL URL is : http://localhost:8080/axis2/services/Myapp.
But i want it to configure like this: http://localhost:8080/phase/axis2/services/Myapp.

You just have to rename your WAR file or XML context file. E.g. if your WAR file is named axis2.war change it to phase#axis2.war. If you use XML file axis2.xml, rename accordingly to phase#axis2.xml.
https://tomcat.apache.org/tomcat-8.5-doc/config/context.html#Naming

Related

Zip file to download on Apache server

Can I configure apache server to render text file as zip file?
If I get file by direct URL I get not compressed file. (.../file.log)
If I get file by URL with parameter I get compressed file.(.../file.log?zip)

Tomcat URL prefix

I got following URL
http://SOMEURL/PREFIX/servlet/test.Home
I thought that PREFIX has something to do with, the <Context path="/PREFIX"> entry. So if i wouldnt set the path it would disappear but it isnt like this. Prefix is still needed.
Because in my html documents i got some Paths to some css Files, which are in the Base Web Content directory under WebContent/css.
And with this prefix they arent founy anymore because it tries to find them in /PREFIX/css..
Should i just create a directory similar to the WebContent directory with PREFIX as name?
If you want your webapp to be deployed on /PREFIX then you should:
Put your <Context> element in your webapp's META-INF/context.xml
Not use the prefix attribute in your <Context>
Name your WAR file PREFIX.war
If you want your webapp to be deployed on / (that is, with no prefix), then name your WAR file to ROOT.war (case matters: use capitals for ROOT).

glassfish using virtual directory

I'm triing to host some files on my glassfish server.
i found this post explaining how to do this with virtual directories:
http://www.marceble.com/2009/07/virtual-directories-in-glassfish/
but this doesn't work for me
when i surf to: localhost:8080/media/test.txt
i get: HTTP Status 404: The requested resource () is not available.
screenshot of my glassfish controlpanel:
http://i77.photobucket.com/albums/j74/bertyhell/glassfish_error.png
Better is this article.
For GlassFish 3.1.x now it is glassfish-web.xml file inside your application config. If you use something like this:
from=/media/* dir=C:/
or the same inside glassfish-web.xml file:
<property name="alternatedocroot_1" value="from=/media/* dir=C:/"/>
Be sure that you created direcotry on your computer: C:/media
"from" must match directory on your computer.
So then it will be available here:
http://{hostName}:{portNumber}/myapp/media/*

Apache tomcat deployment

I have a war file which is a simple dynamic web application where I will call a JSP file which calls a Java file and does some stuff. There is no servlet programming involved.
I deployed the war file in the webapps folder of the tomcat folder.
I restarted the server, the application is extracted and when i call the jsp file like below it is working like a charm.
localhost:8080/Login/login.jsp
But i want to create a directory structure in the webapps folder and place the war file in it and access it as follows
the directory structure is
<tom cat folder>webapps/myapp/mylogin/<my war file>
what i did was copied the extracted war file from the webapps folder and pasted it in the above directory structure
When i accessed it like below it is throwing error
localhost:8080/myapp/mylogin/Login/login.jsp
Please let me know how to host my war file with directory structure in webapps folder.
Hope i was clear in my question.
That should work. What is the error in the log files (access log file, stdout/stderr) and on the screen ?
I need to make a mapping in the server.xml file.
<Host name="showcase.com" appBase="webapps/myapp/mylogin/"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>

Is it possible to alias Glassfish requests like in Apache?

I want to redirect requests to /program.fcgi? to the actual location on the filesystem which is /usr/local/.../program.fcgi?. In Apache I can add the following to the configuration file
Alias /program /usr/local/.../program
How do I do the same in Glassfish?
Glassfish lets you include a sun-web.xml in WEB-INF of your web application that allows you to provide alternate docroots
An example entry would look like :
<property name="alternatedocroot_1" value="from=*.jsp dir=path_to_directory"/>
Details here