Uploading app to Web App Engine in IntelliJ - java

I'm trying to deploy my app to Web App Engine. I have WAE module in web part of my project; there is a path specified in Modules/web/Google App Engine:
/Users/Kamil/IdeaProjects/appengine-java-sdk-1.9.12/
Although when I click on we in general (Modules/web/"Paths" tab), I see following settings:
Output path:
/Users/Kamil/IdeaProjects/NameOfMyProject/web/target/web-1.0.0-SNAPSHOT/WEB-INF/classes
The problem is:
When I click "Upload Web App Engine Application" following error appears:
Bad configuration: Could not locate
/Users/Kamil/IdeaProjects/NameOfMyProject/web/target/web-1.0.0-SNAPSHOT/WEB-INF/appengine-web.xml
I don't get it why it tries to search in wrong directory, not the one specified in Modules. Please advise.
Edit
I noticed that in Modules/web/"Sources" tab whole folder named "target" is excluded. Maybe that's the problem?

According to the error message
Bad configuration: Could not locate
/Users/Kamil/IdeaProjects/NameOfMyProject/web/target/web-1.0.0-SNAPSHOT/WEB-INF/appengine-web.xml
, the deployment code is looking for appengine-web.xml, a crucial config file for your App Engine app. It's looking for that file here:
/Users/Kamil/IdeaProjects/NameOfMyProject/web/target/web-1.0.0-SNAPSHOT/WEB-INF/appengine-web.xml
Is it possible that the file
/Users/Kamil/IdeaProjects/NameOfMyProject/web/target/web-1.0.0-SNAPSHOT/WEB-INF/appengine-web.xml
could not be located ("Bad configuration: Could not locate ") because the file
/Users/Kamil/IdeaProjects/NameOfMyProject/web/target/web-1.0.0-SNAPSHOT/WEB-INF/appengine-web.xml
does not exist?
The path /Users/Kamil/IdeaProjects/appengine-java-sdk-1.9.12/ is the path to your SDK, not the target folder, and is not related to this issue.
The target file is excluded from "sources" because "sources" is the location of files that are included as source code into the build. The target folder is the opposite of source files - it's the flattened-out WAR archive that is used to deploy your app. The deployment tool you use will pack it up into a .war file and send that to the App Engine data centers.
Finally, the output path folder .../classes is where the compiled .java files that turn into .class files for your app are put.
I think you should look into some tutorials on IntelliJ and App Engine to make sure that your project was created and configured properly.
Good luck!

One you can do that locate build folder in explorer and delete it. After that reopen android studio build it again and run it. Now every thing is fine.

Related

Maven-Spring boot existing project, error C://users//usernamefFolder//templates//file not found

I am a begginer in Maven-spring boot developpement technologies.
I have cloned an existing maven project in the root directory c:/workspace/existingMavenProject.
the project seems to be compiling well, but at a given time when i want to show up a file from templates in the browser (by calling the url specified in the controller), i get an error c://users//userNamefolder//templates/file not found, while my existing project is cloned at the root directory instead of user Home directory.
I don't know if it is a problem of windows hiding the user's home directory to softwears, or may be softwear trying to send templates directory files from a wrong location.
Thanks for helping

unable to find servlet(.java) files converted from jsp

I am using eclipse luna and tomcat version 7. I have written few jsp files and executing them on tomcat easily. I have read that jsps are converted into servlets at run time and you can locate them in tomcat/work/catalina/localhost/project name and further. My project name is quizilla and there exist a folder named quizilla-1.0-SNAPSHOT, but this folder is empty. What is the reason and where can i find those .java files. I have attached the screen shot of the folder as wellAs I am in right directory in search of my java files, but the folder is empty. So what should i do
You are using Tomcat from Eclipse, so the work directory is:
projectworkspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0
or something like that (if you haven't changed the Server configuration via Eclipse).
Add
<%=getClass().getResource(getClass().getSimpleName() + ".class")%>
to one of your JSP pages to detect where Tomcat has generated the servlet.

Root URL Location of Flex BlazeDS Project

In my Flex/BlazeDS application I'm trying to read a properties file to load database connection settings. Where should I keep this file (the location) in my project so that I can read the file as in Client Server architecture.
I tried to write a new file into the server root location
new FileOutputStream("OracleSettings.properties")
but the file was never created. I refreshed my Project, explored through Windows Explorer and Searched through Search Engine but was unable to locate OracleSettings.properties file.
How to include this file into project properties so that Eclipse will also export this file into the output folder of the application???
I use Eclipse with FlashBuilder 4.6 Plugin
I created a Flex Project with Server type Java and loaded BlazeDS war file.
Thanks in Advance.
FlexContext.getServletContext().getRealPath("/") is your web application root location.

Current / default directory in vaadin project

I am working on reports. Now I have a jrxml file which I have to load so that I can parse it. However, the problem is, I want to load the file with its name directly
String path = "myreport.jrxml";
But I am unable to find that where should I place that file in my project so that the above path is valid. In simple java project, we just place our desired file in our project folder where src folder is placed, but it is not working in vaadin project. So where should I place my file.
Thanks.
Are you deploying your project to a web server? Then you would need to find out what is the default working directory of that web server.
You could use:
JRXmlLoader.load("/myreport.jrxml");
or if you want to test if the resource is found and take another tries you could load it as a resource and pass it load method from JRXmlLoader as follows:
JRXmlLoader.load(getClass().getResourceAsStream("/myreport.jrxml"));

Issues with getting realpath while working with Eclipse Indigo

I am developing a web application.
My project is stored in
F:\Pro1\OHCMS
Now i want to upload a video in
F:\Pro1\OHCMS\Webcontent\Video
folder.
When i write
filePath=getServletContext().getRealPath("/Video")+"\\";
It is returning file path as
F:\Pro1\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\OHCMS
How can i get the real path of my actual Webcontent folder ?
Your application is being run by your IDE's default application server. That is, your WebContent folder is actually copied to somewhere else (check out your build script to know where exactly is it copied). And after that, all your data is published to server.

Categories