Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Problems launching JSP in Eclipse 3.2
Problems launching JSP in Eclipse 3.2 [message #175313] Mon, 24 July 2006 15:43 Go to next message
Eclipse UserFriend
Originally posted by: i.haddad.tu-bs.de

Hi,

I have recently installed Eclipse 3.2 together with all WTP Plugins, Tomcat 5.5.17 and XDoclets 1.2.3. Meanwhile I am able to run Servlets. But still, if I try to run JSPs (Run -> Run on Server) I get the following Error-Message "No launchable artifact could be found in the selection". I have absolutely no idea what I am doing wrong or what I have forgotten to adjust or to specify. So if anyone has some suggestions, a newbie to dynamic web-programming would be very thankful.

Best Isam
Re: Problems launching JSP in Eclipse 3.2 [message #175323 is a reply to message #175313] Mon, 24 July 2006 16:16 Go to previous messageGo to next message
Nicolai Ehemann is currently offline Nicolai EhemannFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

I have the same setup (Eclipse 3.2, WTP, Tomcat 5.5.x), with new clean
workspace and project, and I have exactly the same problem: Run As -> Run
on Server does not work for JSP files, giving the error message "No
launchable artifact could be found in the selection".

I investigated some further, and found that running the jsp pages does
work, if the are copy *into* the WEB-INF folder - where, as far as i can
say, they shouldn't be, which leads to the browser view pointing to
contextroot/WEB-INF/addCandidate.jsp.

So it seems that WTP is wrongly searching for the WEB-INF folder not to be
in one of the parent folders of the jsp-files, but to be one of the parent
folders *itself*.

Of course, if you manually enter the correct URL, running and debugging
the jsp pages does work - but that's really annoying.

Can anyone verify if this is a bug?

Yours, Nico
Re: Problems launching JSP in Eclipse 3.2 [message #175337 is a reply to message #175323] Tue, 25 July 2006 07:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: i.haddad.tu-bs.de

Hi Nico,

> I have the same setup (Eclipse 3.2, WTP, Tomcat 5.5.x), with new clean
> workspace and project, and I have exactly the same problem:

Good to know.

> I investigated some further, and found that running the jsp pages does
> work, if the are copy *into* the WEB-INF folder - where, as far as i can
> say, they shouldn't be, which leads to the browser view pointing to
> contextroot/WEB-INF/addCandidate.jsp.

I could let them run, but caught each time a 404.

> Of course, if you manually enter the correct URL, running and debugging
> the jsp pages does work - but that's really annoying.

Thank you very much, this was the best hint for the last 24 hours.

Best Isam
Re: Problems launching JSP in Eclipse 3.2 [message #175345 is a reply to message #175337] Tue, 25 July 2006 08:44 Go to previous messageGo to next message
Nicolai Ehemann is currently offline Nicolai EhemannFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

>> I investigated some further, and found that running the jsp pages does
>> work, if the are copy *into* the WEB-INF folder - where, as far as i
>> can say, they shouldn't be, which leads to the browser view pointing
>> to contextroot/WEB-INF/addCandidate.jsp.
>
> I could let them run, but caught each time a 404.
Ahem, of course, yes, I get the 404's, too. That's what I meant when
saying that now, the WEB-INF directory name is in the URL.

Meanwhile, I'm quite sure that this is a bug, and I already tried to
find a way to fix it - checked out the org.eclipse.wst.server modules
from CVS and had a look at them - but it's not really easy to understand
what's going on there if you have no clue about eclipse internals...

I would still be very pleased if a someone with more insight (maybe an
eclipse developer) could verify if the behaviour is not intended, so we
could at least file a bug against the bts.

Yours, Nico
Re: Problems launching JSP in Eclipse 3.2 [message #175361 is a reply to message #175345] Tue, 25 July 2006 14:17 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
I'm not able to duplicate your symptom. Perhaps turning on some tracing
in your environment to see what might be different will help. First you
need to add "-debug" and "-consolelog" to your eclipse startup
arguments. If you wish, they can be added as separate lines at the top
of the "eclipse.ini" file that is located in your Eclipse installation.

Next create a new text file containing the line:

org.eclipse.wst.server.ui/debug=true

Save this file as ".options" in the same directory where "eclipse.ini"
is found. Then start eclipse, from a DOS or shell if this doesn't
happen in your normal startup.

In addition to some general Eclipse output, you should see some trace
output appear from org.eclipse.wst.server.ui. Execute the Run As -> Run
on Server for the JSP and report back with what appears in the output.

If you have checked out source for the org.eclipse.wst.server.ui
plug-in, you can examine the RunOnServerActionDelegate class. It's
run() method is generating the error message where you find
Messages.errorNoModules referenced.

Cheers,
Larry

Nicolai Ehemann wrote:
> Hi,
>
>>> I investigated some further, and found that running the jsp pages does
>>> work, if the are copy *into* the WEB-INF folder - where, as far as i
>>> can say, they shouldn't be, which leads to the browser view pointing
>>> to contextroot/WEB-INF/addCandidate.jsp.
>> I could let them run, but caught each time a 404.
> Ahem, of course, yes, I get the 404's, too. That's what I meant when
> saying that now, the WEB-INF directory name is in the URL.
>
> Meanwhile, I'm quite sure that this is a bug, and I already tried to
> find a way to fix it - checked out the org.eclipse.wst.server modules
> from CVS and had a look at them - but it's not really easy to understand
> what's going on there if you have no clue about eclipse internals...
>
> I would still be very pleased if a someone with more insight (maybe an
> eclipse developer) could verify if the behaviour is not intended, so we
> could at least file a bug against the bts.
>
> Yours, Nico
Re: Problems launching JSP in Eclipse 3.2 [message #175384 is a reply to message #175361] Tue, 25 July 2006 15:50 Go to previous messageGo to next message
Nicolai Ehemann is currently offline Nicolai EhemannFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

first of all, thank you for your response.

> In addition to some general Eclipse output, you should see some trace
> output appear from org.eclipse.wst.server.ui. Execute the Run As -> Run
> on Server for the JSP and report back with what appears in the output.
I followed your instructions and got the following output from the 'Run
on Server' command (with the same erorr message):

org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 > selectionChanged
org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 Selection:
L/EAW/WebContent/addCandidate.jsp
org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 Selection type:
org.eclipse.core.internal.resources.File
org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 checking for
module artifact
org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 moduleArtifact=
WebResource [module=null, path=addCandidate.jsp], module= null
org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 <
selectionChanged 16
org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 Running on Server...
org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 No modules

I'm not really sure if this will help you, but maybe...

> If you have checked out source for the org.eclipse.wst.server.ui
> plug-in, you can examine the RunOnServerActionDelegate class. It's
> run() method is generating the error message where you find
> Messages.errorNoModules referenced.
Yes, I checked out the ...server.ui and ...server.core plug-ins, and
already found the corresponding source code - but it's not really clear
to me what exaclty happens there (and what happens in the methods called
from there), and it seems obvious that the code checking for the correct
folder structure (WEB-INF and WEB-INF/web.xml) is somewhere else, but
without deeper knowledge of the eclipse internals, it can be quite a
task to find that code (especially as I don't have any idea how to
search the code without checking out the whole repository...).

But as the same error message does not appear when the jsp files are in
the WEB-INF directory (or in a directory below that, by the way), I
think it is some error in locating this directory when checking if the
file is launchable.
Maybe this is platform-specific (I use Windows XP).

Yours, Nico
Re: Problems launching JSP in Eclipse 3.2 [message #175398 is a reply to message #175384] Tue, 25 July 2006 16:28 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
Thanks. This shows that the plug-in sees your selection, but can't tie
it to a web module. What is the contents of the
".settings/org.eclipse.wst.common.component" file for this project.

Larry

Nicolai Ehemann wrote:
> Hi,
>
> first of all, thank you for your response.
>
>> In addition to some general Eclipse output, you should see some trace
>> output appear from org.eclipse.wst.server.ui. Execute the Run As -> Run
>> on Server for the JSP and report back with what appears in the output.
> I followed your instructions and got the following output from the 'Run
> on Server' command (with the same erorr message):
>
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 > selectionChanged
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 Selection:
> L/EAW/WebContent/addCandidate.jsp
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 Selection type:
> org.eclipse.core.internal.resources.File
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.562 checking for
> module artifact
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 moduleArtifact=
> WebResource [module=null, path=addCandidate.jsp], module= null
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 <
> selectionChanged 16
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 Running on Server...
> org.eclipse.wst.server.ui FINER 25/07/06 17:31.34.578 No modules
>
> I'm not really sure if this will help you, but maybe...
>
>> If you have checked out source for the org.eclipse.wst.server.ui
>> plug-in, you can examine the RunOnServerActionDelegate class. It's
>> run() method is generating the error message where you find
>> Messages.errorNoModules referenced.
> Yes, I checked out the ...server.ui and ...server.core plug-ins, and
> already found the corresponding source code - but it's not really clear
> to me what exaclty happens there (and what happens in the methods called
> from there), and it seems obvious that the code checking for the correct
> folder structure (WEB-INF and WEB-INF/web.xml) is somewhere else, but
> without deeper knowledge of the eclipse internals, it can be quite a
> task to find that code (especially as I don't have any idea how to
> search the code without checking out the whole repository...).
>
> But as the same error message does not appear when the jsp files are in
> the WEB-INF directory (or in a directory below that, by the way), I
> think it is some error in locating this directory when checking if the
> file is launchable.
> Maybe this is platform-specific (I use Windows XP).
>
> Yours, Nico
Re: Problems launching JSP in Eclipse 3.2 [message #175406 is a reply to message #175398] Tue, 25 July 2006 19:08 Go to previous messageGo to next message
Nicolai Ehemann is currently offline Nicolai EhemannFriend
Messages: 6
Registered: July 2009
Junior Member
> Thanks. This shows that the plug-in sees your selection, but can't tie
> it to a web module. What is the contents of the
> ".settings/org.eclipse.wst.common.component" file for this project.
Here it is:

<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="EAW">
<wb-resource deploy-path="/" source-path="/WebContent"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="java-output-path" value="build/classes"/>
<property name="context-root" value="EAW"/>
</wb-module>
</project-modules>
Re: Problems launching JSP in Eclipse 3.2 [message #175414 is a reply to message #175406] Tue, 25 July 2006 20:07 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
This looks normal. The line with source-path="/WebContent" should make
your JSP, since it's in the WebContent folder, appear to be "in" the
module. Since you are able to checkout source and I don't have any good
explanations for this behavior, the quickest way to find the problem may
be to debug it. Before taking that step, in case I'm making some wrong
assumptions, can you confirm that this problem isn't local to just this
project? If you create a new Dynamic Web Project, add a JSP, and try
Run As -> Run on Server you encounter the same problem?

Larry

Nicolai Ehemann wrote:
>> Thanks. This shows that the plug-in sees your selection, but can't tie
>> it to a web module. What is the contents of the
>> ".settings/org.eclipse.wst.common.component" file for this project.
> Here it is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project-modules id="moduleCoreId" project-version="1.5.0">
> <wb-module deploy-name="EAW">
> <wb-resource deploy-path="/" source-path="/WebContent"/>
> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
> <property name="java-output-path" value="build/classes"/>
> <property name="context-root" value="EAW"/>
> </wb-module>
> </project-modules>
Re: Problems launching JSP in Eclipse 3.2 [message #175438 is a reply to message #175313] Wed, 26 July 2006 05:53 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Isam Haddad wrote:
> But still, if I try to run JSPs (Run -> Run on Server) I get the
> following Error-Message "No launchable artifact could be found in the
> selection". I have absolutely no idea what I am doing wrong or what I
> have forgotten to adjust or to specify. So if anyone has some
> suggestions, a newbie to dynamic web-programming would be very thankful.

Looks like bug 149425:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=149425

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Problems launching JSP in Eclipse 3.2 [message #175445 is a reply to message #175414] Wed, 26 July 2006 06:57 Go to previous messageGo to next message
Nicolai Ehemann is currently offline Nicolai EhemannFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

Larry Isaacs wrote:
> This looks normal. The line with source-path="/WebContent" should make
> your JSP, since it's in the WebContent folder, appear to be "in" the
> module. Since you are able to checkout source and I don't have any good
> explanations for this behavior, the quickest way to find the problem may
> be to debug it. Before taking that step, in case I'm making some wrong
> assumptions, can you confirm that this problem isn't local to just this
> project? If you create a new Dynamic Web Project, add a JSP, and try
> Run As -> Run on Server you encounter the same problem?
I had already created a new workspace and a new project, as in the
beginning, the problem was occuring (among other problems) in my old
eclipse 3.1.2 workspace. But to be completely sure, I now again created
a new workspace in an empty directory, added a new dynamic web project
to it, and added a jsp file via New->JSP, which was created in the
WebContent directory - and the problem is exactly the same.

Yours, Nico
Re: Problems launching JSP in Eclipse 3.2 [message #175451 is a reply to message #175438] Wed, 26 July 2006 07:14 Go to previous message
Nicolai Ehemann is currently offline Nicolai EhemannFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

> Looks like bug 149425:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=149425
You are right. The problem is fixed in wtp 1.5.1. I'm very sorry having
wasted your time (especially yours, Larry). I could have found the bug
report by myself :-(

Thank you again for your help

Yours, Nico
Previous Topic:Deploying webservice on Oracle IAS
Next Topic:javax.servlet.* not recognized
Goto Forum:
  


Current Time: Fri Mar 29 06:19:07 GMT 2024

Powered by FUDForum. Page generated in 0.05004 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top