upload directory or folder jersey web service - web-services

upload directory or folder using jersey web service, If I give the directory path instead file path I am getting Access Denied .
Please suggest.

Related

Add file to web root when deploying Expo web project?

I need a file to be added to the web root when I deploy my Expo web project (An Apple App Site Association file).
Is this functionality supported by Expo out the box?
All you have to do is make a folder called 'web' in the root of your project. Any files in there are moved to the web root when expo build:web is run
https://medium.com/#toastui/from-zero-to-publish-expo-web-react-native-for-web-tutorial-e3e020d6d3ff

AWS EC2 RHEL7 Instance permission problem

I have set all the folders in my /var/www/upload directory to 755. But still my php application hosted on that server is not performing file uploads. Please tell me how to fix this permission problem and how my php file uploading will be working fine.
It does not shows any error. Just file is not moved to the intended folder.

how to store image, video, audio file in aws server permanent outside tomcat deployed directory?

Currently, I am using AWS server as a beginner.
currently i am storing image, video file in project directory.
tomcat8/webapps/ROOT/Video/
but whenever project is redeployed all uploaded file is remove because of project WAR file is replace.
but i don't want to store these inside of AWS root directory. I want to store these into outside project directory.

a Web Service deployed (as an aar) file to Axis2

I have a Web Service deployed (as an aar) file to Axis2, but the dependencies (in the form of .jar files within the lib directory of the aar file) are not found on execution. They do get used properly if I copy them into the WEB-INF lib directory of the Axis2 installation, but this is not an ideal workaround.
Does anybody know of any configuration settings I might have missed? Has anybody got a
aar file (on OC4J or other server) with Axis2 v1.2? I'm not sure whether my problem is with Axis2, so might have to deploy the service to a Tomcat server to check but would rather not go through that cycle if someone can point me in the right direction.
Thanks,
You can put the jars into a lib directory inside the AAR. as pointed out in Where to deploy a jar dependency of my webservice?
This will help you understand the structure of the aar file -http://axis.apache.org/axis2/java/core/docs/quickstartguide.html

HTTP Error 404 with jetty server

I have the following folder structure in my project.
> src/
>>main/
>>>webapp/
>>>>WEB_INF/
>>>>>pages/
>>>>>>js/
All my script files are located in js folder and my jsp page is located in pages folder.In order to include abc.js script in my jsp page I wrote the following line
<script type="text/javascript" src="/WEB-INF/pages/js/abc.js"></script>
But I got following error
"NetworkError: 404 Not Found - http://localhost:8080/WEB-INF/pages/js/abc.js"
I am using jetty server to deploy my project. For running it I am using
mvn jetty:run
If I am putting my script file directly in webapp folder and including script in following way then it is working perfectly fine.
<script type="text/javascript" src="abc.js"></script>
But I want to maintain folder structure of my project by putting all scripts in js folder.
Can somebody please tell me why jetty server is taking files located only in webapp folder?
I am using windows7
Your src is incorrect. Java Servlet specifications states explicitly that no document under WEB-INF directory will be available to the webserver. You need to place your JavaScript file outside of it.
Usually, you place jsp files inside of it, because they're not accessed directly. They're accessed through a Servlet or any other web development framework in Java.
If you want to maintain your folder structure, just put your js folder on the web archive root:
webapp/
js
WEB-INF/
classes/
lib/
pages/
web-xml
WEB-INF directory was designed exactly to prevent that users could access files they should not get access to, such as classes, lib directories, or web.xml deployment descriptor.