Home » Newcomers » Newcomers » Importing project from SVN unable to run project on localhost?(Run requires server port # number change?)
|
Re: Importing project from SVN unable to run project on localhost? [message #872747 is a reply to message #872686] |
Wed, 16 May 2012 18:29 |
|
On 5/16/2012 9:43 AM, ch_arles M wrote:
> Hi,
>
> I'm new to setting up eclipse, but not new to using the it. I'm having problems and hope someone can help me. I don't have the professional support otherwise.
>
> [snip]
> I get the error (attached screenshot) telling me there are "several ports (8080, 8009)
> etc., required by tomcat v7.0 server at localhost are already in use. ..."
>
> Can someone tell me how to fix this?
>
> I tried closing a project I had open in Project Explorer, guessing that was the problem -- Select the project -> File -> close project. However I got another error message saying the "resource<projectName> is not accessible for launching"
>
> I don't want to launch that project. I want to close it or remove it from the Project Explorer window and launch the project I imported from SVN.
>
> How is this done?
>
> Thanks!!
It's not that you have another project running. It's that Tomcat's
running on your box already (or something else) on port 8080). You'll
have to change the port the Tomcat under Eclipse's control is running
on. Go to the Server view, usually bottom center of the workbench, and
double-click your Tomcat server. A page will open in the Editor view
allowing you to change what ports are used.
|
|
| |
Re: Importing project from SVN unable to run project on localhost? [message #872796 is a reply to message #872784] |
Wed, 16 May 2012 20:41 |
|
On 5/16/2012 2:17 PM, ch_arles M wrote:
> Thanks, Russell. I changed the port to 8000, however, I still can't
> launch the page. I'm getting a different error. "The selection cannot be
> launched, and ther are no recent launches." What step/s am I missing or
> doing wrong? Thanks.
For me, this post is asking two questions, the first about importing
projects that are in Subversion and the second, the real one I think you
wish to address. They are pretty much unrelated, I think.
In a Dynamic Web Project projects that builds correctly (and this
question really belongs on the Eclipse web tools forum), you right-click
on your JSP, thing.jsp, and choose Run As -> Run on Server. Typically,
this launches the internal (Eclipse) browser.
However, there are a number of things you need to set up in the
workspace that weren't a function of importing this project from
Subversion. I assumed you'd already set them up. These are:
- Integrate Tomcat into Eclipse workspace.
- Create a server "project". Add the project you wish to run to it.
This is covered in a number of tutorials. Mine is here, but it's very
basic and verbose, so you'll have to pick your way through what's not
relevant to your more advanced state:
http://www.javahotchocolate.com/wtp-tutorials/wtp-tutorial.html
|
|
|
Re: Importing project from SVN unable to run project on localhost? [message #872864 is a reply to message #872796] |
Thu, 17 May 2012 01:11 |
ch_arles M Messages: 6 Registered: May 2012 |
Junior Member |
|
|
Thanks, Russell. I looked over your tutorial, and I know I will be going through it more closely very soon. Thank you for writing and posting it.
As I've given the steps that I have taken to check out the repository in Eclipse, I won't type that again.
Here's the thing, I need to edit some JSPs, save them, test them in the browser and keep them version controlled. Taking my steps above however, didn't allow me to edit the project at all, only view it in a seemingly "read only" state in Eclipse. I have integrated tomcat 7. I installed Subclipse.
Since I am obviously going about this wrong, my question is how do I access a project (that is in a SVN repository) in Eclipse via Subclipse, edit a page, and then run the page using tomcat so that I can see it in a browser? Then save my changes back in SVN. I don't know how to do this. I hope this clears up what I am asking. Thanks.
|
|
| | |
Re: Importing project from SVN unable to run project on localhost? [message #873090 is a reply to message #872872] |
Thu, 17 May 2012 13:25 |
|
On 5/16/2012 7:39 PM, ch_arles M wrote:
> I tried creating a new project and importing project from svn into the
> newly created project
>
> I tried directly importing the project by selecting FILE -->"import" -->
> create a new project by checking out an existing project from a SVN
> repository"
>
> Neither of these methods will show the project in the "Add and Remove
> Projects" dialog box for tomcat to run it.
>
> As I said, I'm obviously going about this all wrong because nothing I'm
> doing is working, but I keep trying different things based on stuff I'm
> reading via google or trying to find a logical path. Perhaps I should
> stop until someone gives me a step by step process about how this done,
> I really can't believe it's as difficult as it has become for me.
I don't use Subversion any more--or rarely--but I've never set up my
projects the way you've described. Doubtless you can do that, but I
haven't. I use Git, but other than the version control tool, I do what
I'm describing here. It appears from the .png you posted that you're on
Windows 7, so I'll tailor my remarks. (I use Linux almost exclusively,
but what I'm saying here, I've done hundreds of times on Windows.)
Set up an Eclipse workspace to host this project. This would include a)
Eclipse IDE for Java EE Developers, b) a Sun JDK (and not merely a JRE)
and c) Tomcat. (a) through (c) are of course covered in that tutorial.
You're probably already okay here.
Set up TortoiseSVN (if you haven't/don't know how to, see:
http://www.javahotchocolate.com/tutorials/tortoisesvn.html).
Bring the Subversion-controlled sources into your filesystem where you'd
like them. Make sure they "work" the way you'd expect. I don't use
Eclipse-Subversion integration to do this. I never have. This is where
our methods diverge. There are other forums, like the Eclipse technology
Subversive one, that might recommend a more "space-age" and integrated
approach; I'm just telling you what works and has always worked every
time for me.
Assuming the source code is there...
If what's in Subversion is in fact a proper and correct Eclipse project,
the import them into Eclipse via File -> Import -> General -> Existing
Projects into Workspace -> Next and Browse to the parent of your
project's root, select (don't double-click) on that project, then click
OK. This should display projects Eclipse thinks are there. Select the
one(s) you wish to import and click Finish to do it. Incidentally, I
would NOT "Copy projects into workspace" (Eclipse offers this).
If, however, what's in Subversion isn't a proper/well formed Eclipse
project (maybe its author screwed up committing the necessary files),
then you'll have to create a new project.
Do this via File -> New -> Project... -> Dynamic Web Project and, when
the wizard comes up, type in the project name, then unclick Use default
location. Browse to your project's root, click OK and proceed. Again, if
offered, don't let Eclipse copy the project sources into your workspace.
Hope this doesn't just totally confuse you.
Russ
|
|
| |
Goto Forum:
Current Time: Sun Sep 22 19:07:31 GMT 2024
Powered by FUDForum. Page generated in 0.09020 seconds
|