I am trying my hands on using Zend framework with netbeans.
I have setup everything correctly as i can create project using ZF command line and can create other controller and actions.
But when i setup project in netbeans and use run command it does not seems to understand Zend framework MVC url structure and shows complete path in browser.
instead of running http://testing.com/about
it is taking http://testing.com/application/controllers/AboutController.php
but when i type is manually everything seems to be working fine.
you need adjust a few settings in your project properties. Open your project properties menu and select Sources make sure your Web Root is set to public, while you're there make sure your sources and project folder are correct.
Next select Run Configuration and make sure your Project URL is correct. When using ZF there is no need to specify an index file, netbeans may complain some but it will work.
Now when want to run your project you have to run the whole project. When using ZF you can't run just one file because all request are routed through the index.php in the public folder. So Always select run at the project level and not at the file level.
Related
Trying to create custom UI component going through ZK 6.0.1 Component Development Essentials.
Always got error in logs "http://localhost:8080/zk6/zkau/web/_zv2011051111/js/examples.com.foo.wpd : HTTP Status 404 - /js/examples.com.foo.wpd" when trying to use custom component.
Found the war file with this example in scala, it works OK. I have copied all files from it to my project, and got same error.
The project structure is according to tutorial. What might be wrong?
You have to put the web folder, which contains the js files, in the java classpath, that means it should be put under the src folder. More easy way is to use the ZK Maven Archetype to create the template for you.
At least the way IntelliJ IDEA does things (which I see your are using, as am I), simply placing the web folder under the src folder doesn't seem to automatically get it copied to the artifact (although I'm not sure why). So I tried manually putting it in the WEB-INF/classes folder, and that worked. So the correct path for your example is <project-root>/web/WEB-INF/classes/web/js/examples/com/foo/zk.wpd.
I am already using an open source GWT project (iServe) and I would like to integrate into it another open source GWT project (PetalsBPM), by which I mean being able to call it and reference its methods.
I have imported iServe in Eclipse (it has multiple modules) as separate Maven projects referencing its other and can run it successfully through Runas -> Web application in development mode.
If I do that and run the other project through the console as mvn gwt:run, I call initiate PetalsMBP through iServe. However, that means that the two programs have to run as is, without communication with each other.
I have also imported the second project into eclipse as a java project successfully (converting into a Maven one causes problems - various lifecycle configurations ones), but whenever I try to add to to iServe through Properties -> Java Build Path -> Projects, although it does not cause any errors immediately, I cannot launch iServe anymore. It produces the following error:
"Exception occurred executing command line.
Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:...iserve-sal-gwt-1.0.0-SNAPSHOT"): CreateProcess error=206, The filename or extension is too long"
Are my problems related to the fact that PetalsBPM is not a Maven project in Eclipse (I doubt it)?
Am I doing something wrong, i.e., this is not the way to reference a project from another one? should I add a reference to the first project's (iServe) gwt.xml file?
Is there a way to do what I want without having to wrap the second project as a jar and calling it from iServe? I would prefer not to, since producing a jar every time I make a slight change is not exactly efficient!
P.S: The second project is a regular GWT project with an entrypoint, not just a module. Should I remove this?
UPDATE: Trying to figure out the source of this error, I attempted to simplify the problem, so I performed the following moves:
I created two new simple GWT projects and tried to reference one
from the other. Worked fine
I referenced the project I actually want
to use (PetalsBPM) from the simple one I just created. Also works
fine.
I referenced the new simple project from the original one I
want to use (iServe). Also works fine.
Tried doing what I actually
want to do, copying the settings from 2&3. Produces the same error
"CreateProcess error=206, The filename or extension is too long" if
I reference PetalsBPM (does not when I remove it from the referenced
projects)
So, I tried switching workspaces. I created a new workspace in C:\, and moved the actual projects there. Still it did not work. :(
Any more ideas?
I met the same type of error "Create Process, error=206, path too long etc." a hundred times.
Then, I found a solution/explanation in google-groups, it solved my problem.
I post the content and link as it might help others.
This website (StackOverflow) really helped me a thousand times.
Thanks to you all !
solution/explanation :
(Response from Stephen Johnson)
(...) if you're using eclipse plugin go to Project | Properties, choose
Google \ App Engine \ ORM and only include directories that you have
classes that you want enhanced. By default it does the entire project
so that includes a lot of needless files. (...)
Link :
original post # google-groups
Read the exception message again. Somewhere along the way Maven is generating a path that is too long for (some) Windows API to handle, try moving your workspace to a directory straight below C:\.
I just tried "skolima" reply and it worked for me. In Eclipse I clicked File->Switch Workspace.
Three things to note:
After I created the workspace in "C:\workspace" I had to update my Project->Properties > Java Build Path > Libraries > Add External JARs...
I'm using Windows 7.
I'm using "Eclipse Java EE IDE for Web Developers"
I hope this others.
I am using Eclipse for J2EE project...
one device send request to my side and url like
http://myIP:myPort/corporationweb/Controller
/corporationweb/Controller is fixed we can't change it because it made on device
my project name in eclipse is "VirtualTest" but here tomcat include project name if i mapping any servlet, /corporationweb/Controller URL like
http://localhost:8080/VirtualTest/corporationweb/Controller
I need page open without change project name
any i can mapping servlet directly so URL like http://localhost:8080/corporationweb/Controller
any URL rewriting technique..
make as default application for my project
Rightclick project in Eclipse, choose Properties, go to Web Project Settings and set Context root to /.
This will let Eclipse deploy the project on context root instead of project name (which is the default).
Unrelated to the concrete problem, you really need to ensure that your application is written the way so that it does not care on which context path the application is been deployed. This is namely a server specific setting which is not controllable from inside your project. Make use of HttpServletRequest#getContextPath() the smart way.
If you want to make "VirtualTest" as default application for your project, and not showing this name in URL, you can simply change project name to "root", which is a special name for the default application.
Your URL will be like:
http://localhost:8080/corporationweb/Controller
If you are using Eclipse. Go to server and remove the unwanted project which are Synchronized, then restart your server. Worked for me
I'm using RubyMine 3.1.1 with Rails 3.0.9.
I have the Spree project cloned from Github, and I want to debug the server while working on the code. To do this, Spree includes a sandbox rake command that creates a subfolder (called sandbox) that contains an instance of the rails app, one that refers to the parent directory containing the source as its spree gem.
If I close the original project and open the sandbox subfolder as a new probect, I get the correct run configurations for development and production and I can successfully debug. However, this doesn't let me edit the spree code in the parent directory.
If I'm in the parent directory, the subfolder is there of course, but there's no rails run configurations and you can't add one as it says there is no rails server launcher in the project (or some facsimile of that message).
Anyone know how to make RubyMine recognize the run configurations for a subfolder?
I ran across this conversation that resolved a very similar issue to what you're reporting.
The gist is that you can go into settings | project structure and then add your subdirectory as a source root. Then you can set up your run configuration with that subdirectory instead of the project root.
How do you add a PHP framework to code assist/completion in Eclipse PDT?
And is it possible to have that framework added as default for all projects?
Generally speaking in Eclipse, you can add a library or framework to code assist/completion by:
Going into Project > Properties
Under PHP Include Path, pick the "Libaries" tab.
Add an "external folder" with the path to where your framework is located.
This can also be done on project creation. I'm not sure of a way to have it automatically attach a library in this way.
The feature itself is a bit more flexible than that, allowing you to do things like set variables for a DB connection, rather than having to copy down lengthy config files to your local install.