Importing existing JSP project to Eclipse or Net Beans - eclipse

I am trying to import project from some server on my localhost.
I would prefer to import it in NetBeans, but Eclipse is also fine. I set up Tomcat server in NetBeans for now. Then I tried to create new Java Web project with existing source and then I go through the wizard, and when I should select Web pages folder, Web-inf content it says: "Web Pages folder overlaps Project folder."
But I am not sure what kind of setup should I have there. If you maybe have some advice or video tutorial, that would be awesome..
Thanks!

you can directly import it through eclipse , there is a option of importing some project , don't create a new project

Related

How to import ATG CRS module in eclipse and customize

I am new to ATG and i installed ATG CRS 11.2 using CIM and it is installed properly and i am able to access the site but i want to import the CRS module in eclipse and customize the existing code for my learning purpose.
I tried the ways given on net, install atg plugin and trying to import but it is not importing.
Please explain the steps to do same.
Thanks
The Oracle A-Team have an article Building Oracle ATG Commerce With Maven. They have created a sample github project which uses CRS 11.2 as the basis for the project. You should be able to import this as a Maven project within Eclipse.
Create a new Java Project in Eclipse
Using windows browser, go to the location where your Java Project is created.
Open the Java Project folder, you will find .classpath and .project files there.
Now, go to your ATG_ROOT folder, and find the folder CommerceReferenceStore/Store
Copy-paste your .project and .classpath files here.
Edit the .project file and replace the project name by CommerceReferenceStore.Store.
CRS also has some other (nested) modules. Do the same for the nested modules you want to import in eclipse.
Re-open eclipse, Go to File -> Import -> Other -> Existing Projects into your workspace.
Browse to your ATG_ROOT directory and select the Store folder
Check on "Search for Nested Projects"
It will populate a list of all the projects, which you can now import.
For customizing CRS, it is not recommended to modify the existing CRS
code. You can create a new module, and layer it on top of CRS to
customize it. For more details on creating a new module above CRS, and
doing an assemble-deploy via CIM, you can follow this article provided
below. It has 3 small parts which can get your task done!
Here is the article:
http://learnoracleatg.blogspot.in/2016/12/create-and-deploy-new-atg-module-on-local-from-scratch-part-1.html

How to import or extend existing CRS (CommerceReferenceStore) project into eclipse

I have successfully installed ATG10.2 and deployed CRS using CIM.
Now i want to import CRS Project into eclipse.
But i am unable to import it.
Please help me to import into eclipse (elipse ATG Plugin already installed).
This is a common tweak, I use it. If you are able to create a new ATG web module then you would be able to do this too.
Create a test application from your atg plugin, and copy its .classpath and .project files to the CommerceReferenceStore Folder under ATG root directory, don't forget to change the name of the project in the .project file. You can change the classpath after importing the project to eclipse.
then go to eclipse and import an already existing project (without using atg plugin), you are good to go.
If you want to get the individual modules as projects, add these two files to the individual modules and import them to eclipse.
Hope this helps!
Install the Eclipse plugin from %DYNAMO_ROOT%\Eclipse folder. Then add new exusting ATG project.

Servlet libraries are not defined in Eclipse

I am trying to make a simple servlet in Eclipse. But including the following libraries generates errors as if they were not defined in Eclipse.
import javax.servlet.*;
import javax.servlet.http.*;
How to have them recognised and defined?
Please add servlet-api.jar in classpath of your project.if you are using tomcat server, then it should be present in ${CATALINA_HOME}/lib
Be sure you are doing the right way:
If you are using the Classic version of Eclipse, then you must donwload the Web Tools Platform.
If you have an Eclipse Java EE Edition, then there is already installed the necessary plugins.
Create a new Dynamic Web Project: Menu New > Project > Dynamic Web Project.
Fill all values you want for the new project.
Do right click on the project and select New Servlet.
Last step creates a new Class file that is a servlet class, already importing the necessary packages, such as javax.servlet.http.*.
If you are using a Eclipse with a Maven plugin installed then, after configured it, you can only add the following dependencies:
http://mvnrepository.com/artifact/javax.servlet/servlet-api/2.5
http://mvnrepository.com/artifact/javax.servlet/jstl/1.2
http://mvnrepository.com/artifact/javax.servlet/jsp-api/2.0
In fact, you can see this tutorial explaining very well all the steps to create a Dynamic Web Prroject using WTP.
Or by ugin Maven, this one and this full explained.
Hope this help...

Importing a existing Web Application , into Eclipse

I need to import a existing Web Application , into Eclipse .
Please see the Structure of my Web Application as shown in the below figure .
http://imageshack.us/f/220/structurek.jpg/
From Eclipse IDE , while using import What option i need to select that is should i use
Existing projects into Eclipse
Archive File
File System
please see this image
http://imageshack.us/f/850/eclipseo.jpg/
Import existing projects into Eclipse works only for projects that were created in Eclipse.
And you're definitely not dealing with an Archive File here.
Import from the File System just copies the resources but does not actually create an Eclipse project for you.
What I would advise you, is to create a new Dynamic Web Project, configuring all the required facets, and then just copy all the contents of your existing app to the WebContent folder, either by drag'n'dropping it into the Project Explorer or by using Import from the File System, overwriting all the contents.
So far, there seems to be no other way to do it in Eclipse. However you may check out the similar post. The user #RC recommends using ant task for this process, but I'm more than sure that it won't configure all the required facets for you. It may work for some simple Java projects, but surely not enough for Java EE projects.

How do I deploy/import war package into Netbeans

I have looked through the help documentation in netbeans 6.5.1 but cannot find anything explicit explaining how to deploy/import a war package.
I know in Eclipse, it's as easy as right clicking in the Project Explorer >> select IMPORT >> WAR FILE.
However, I still am unable to find a solution for Netbeans.
Thankyou,
Jordan
posted elsewhere, thought i might post here too.
after some googling I've found the solution and here are the steps:
(tested using apache's ode.war in NetBeans 8.0)
unzip the war file
in the unzipped folder, you will see WEB-INF/, META-INF/, etc., create a sub-folder named web in the unzipped folder.
put everything else into web (now they will be web/WEB-INF/, web/js/, ...)
go to netbeans, new project -> java web -> web application with existing sources
pretty much just press next all the way through. voilà, it's done.
I assume you don't already have an ant or maven project for your web project? If you did, you would just import a maven project or create a Web Free-Form Application and wire it up to your ant script.
I would unzip the war file, create a new web application with existing sources in netbeans and wire everything up using the wizard.
Import the war project to eclipse.
Then import the eclipse project to netbeans
If you don't have eclipse handy, just place the war file into the webapps folder of Tomcat, go to the bin folder of Tomcat and run startup. Tomcat will automatically extract the war file for you. Now go to the webapps folder and you'll find another folder there, with the same name as your war.
I couldn't find an option to import a war directly into Netbeans (strange. Perhaps someone could create this feature and submit it as a patch to Netbeans). The folder which gets extracted into the Tomcat folder can be used as the Netbeans project. It's advisable to copy it to some other folder first. Import by File > New Project > Web application with existing sources.
Eclipse has an option to export a war and include the sources with it too, so there's a chance that the source files are in the war too.