Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Error executing JSP page from Eclipse 3.2 WTP
Error executing JSP page from Eclipse 3.2 WTP [message #179944] Tue, 26 September 2006 07:10 Go to next message
Eclipse User
Originally posted by: dolpheen.gmail.com

Hello,
I have installed Eclipse by downloading and extracting the file:
wtp-all-in-one-sdk-R-1.5.0-200606281455-win32.zip
on my PC.
I am using JDK 1.5 as a JVM.
After that I have created a Sample Project containing a very simple
index.jsp
located at
C:\eclipse\workspace\SampleProject\WebContent\index.jsp
the relative path being
/SampleProject/WebContent/index.jsp
I have configured Tomcat 5.5 as the application server.
When I run this jsp file using 'Run on Server' option , I get the error:
Server Error: No launchable artifact could be found in the selection
What may be the problem?

Then I decided to run it independently.
I started my Apache server, it is listening on port 12769
The console info says that Server is running.
So i just tried the following url's on the server:
http://localhost:12769
http://localhost:12769/SampleProject/WebContent/index.jsp

But not able to run any one.
May I say that Tomcat is running as I am not getting the Tomcat welcome
page.
Is this the correct location of file?
http://localhost:12769/SampleProject/WebContent/index.jsp

I am also having Tomcat Sysdeo plug-in and I have decided not to install
it.

Please help.
-Sameer
Re: Error executing JSP page from Eclipse 3.2 WTP [message #179953 is a reply to message #179944] Tue, 26 September 2006 12:11 Go to previous messageGo to next message
Eclipse User
Originally posted by: wknauf_NO_._INSIDE_hg-online.de

Hi Sameer,

first a silly question: you created a Dynamic or Static Web Project, not a plain
Java project?


> May I say that Tomcat is running as I am not getting the Tomcat welcome
> page.
> Is this the correct location of file?
> http://localhost:12769/SampleProject/WebContent/index.jsp
>

This is the correct behaviour, as Eclipse by default creates a copy of the
server in your workspace (picking only the configuration files) and starts up
this instance. So you will not see the default server home page at "/" because
this comes from the ROOT webapp.

If you use a dynamic web project the web context is configured in this file in
your workspace:
\.settings\org.eclipse.wst.common.component
By default the URL should be "http://localhost:12769/SampleProject/index.jsp".

Hope this helps

Wolfgang
Re: Error executing JSP page from Eclipse 3.2 WTP [message #179961 is a reply to message #179953] Tue, 26 September 2006 14:01 Go to previous messageGo to next message
Eclipse User
Originally posted by: dolpheen.gmail.com

Dear Sir,
Thanks for responding.
I have created a dynamic web project.
As posted previously the properties of index.jsp shows:
Path: /SampleProject/WebContent/index.jsp
Location: C:\eclipse\workspace\SampleProject\WebContent\index.jsp
I am trying to run this page using Run... option.
I have created a Launch configuration (referring Tomcat) for the same.
Upon running it starts the Tomcat server, but nowhere Oputput is displayed.
So, the server being in running condition,
I have tried the following in IE as suggested by you.
http://localhost:12769/SampleProject/index.jsp
It won't work.
description: The requested resource (/SampleProject/index.jsp) is not
available.
What may be the problem?
One another thing I have noticed that, though I have changed the server
port to 12769 by using server.xml from conf folder, still the console run
of Tomcat shows that it is running on port 80.

INFO: Starting Coyote HTTP/1.1 on http-80
Sep 26, 2006 7:39:34 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
Sep 26, 2006 7:39:34 PM org.apache.jk.server.JkMain start

I am getting directory listing by typing
http://localhost:80

Why this may happen?
May I use Eclipse for formatting purpose only and let the jsp pages run by
copying them to appropriate webapps folder?

Please help.

-Sameer
Re: Error executing JSP page from Eclipse 3.2 WTP [message #179969 is a reply to message #179961] Tue, 26 September 2006 14:15 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1309
Registered: July 2009
Senior Member
To change the port, you can double-click on the server in the Servers
view to open the server editor for the Tomcat server. Then change the
port(s) in the Ports section of the Overview page and save the
configuration. You can also modify server.xml directly, but it should
be the one under the Servers project in your workspace.

Also, what is the state of the "Run modules directly..." checkbox on
this Overview page of the server editor?

Cheers,
Larry

Sameer wrote:
> Dear Sir,
> Thanks for responding.
> I have created a dynamic web project.
> As posted previously the properties of index.jsp shows:
> Path: /SampleProject/WebContent/index.jsp
> Location: C:\eclipse\workspace\SampleProject\WebContent\index.jsp
> I am trying to run this page using Run... option.
> I have created a Launch configuration (referring Tomcat) for the same.
> Upon running it starts the Tomcat server, but nowhere Oputput is displayed.
> So, the server being in running condition,
> I have tried the following in IE as suggested by you.
> http://localhost:12769/SampleProject/index.jsp
> It won't work.
> description: The requested resource (/SampleProject/index.jsp) is not
> available.
> What may be the problem?
> One another thing I have noticed that, though I have changed the server
> port to 12769 by using server.xml from conf folder, still the console
> run of Tomcat shows that it is running on port 80.
>
> INFO: Starting Coyote HTTP/1.1 on http-80
> Sep 26, 2006 7:39:34 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Sep 26, 2006 7:39:34 PM org.apache.jk.server.JkMain start
>
> I am getting directory listing by typing http://localhost:80
>
> Why this may happen?
> May I use Eclipse for formatting purpose only and let the jsp pages run
> by copying them to appropriate webapps folder?
> Please help.
>
> -Sameer
>
>
Re: Error executing JSP page from Eclipse 3.2 WTP [message #179973 is a reply to message #179961] Tue, 26 September 2006 14:27 Go to previous messageGo to next message
Eclipse User
Originally posted by: wknauf_NO_._INSIDE_hg-online.de

Hi Sameer,

the problem with the port comes from Eclipse copying the config files to your
workspace and starting the server from there. Take a look at a folder "Servers"
in your workspace, there you should find the tomcat configuration in a subfolder.
You can change this behaviour if you doubleclick the tomcat server in the
"Servers" view. There is an option "Run modules directly from the workspace". If
you uncheck this option your full tomcat will be started up, thus showing the
welcome page and using your modified port.

Nevertheless, the index.jsp should be opened if you pick "run on server".

Is there a chance you could post your sample project ? Best way is to export it
as a WAR file. You could also try to export and reimport it yourself, this way
you will get a clean new project (avoids running into errors which result from a
broken project).

Hope this helps

Wolfgang

Sameer schrieb:

> What may be the problem?
> One another thing I have noticed that, though I have changed the server
> port to 12769 by using server.xml from conf folder, still the console
> run of Tomcat shows that it is running on port 80.
>
> INFO: Starting Coyote HTTP/1.1 on http-80
> Sep 26, 2006 7:39:34 PM org.apache.jk.common.ChannelSocket init
> INFO: JK2: ajp13 listening on /0.0.0.0:8009
> Sep 26, 2006 7:39:34 PM org.apache.jk.server.JkMain start
>
Re: Error executing JSP page from Eclipse 3.2 WTP [message #180008 is a reply to message #179944] Tue, 26 September 2006 20:32 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2310
Registered: July 2009
Senior Member
Sameer wrote:
> When I run this jsp file using 'Run on Server' option , I get the error:
> Server Error: No launchable artifact could be found in the selection
> What may be the problem?

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

--
- Nitin


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Error executing JSP page from Eclipse 3.2 WTP [message #180030 is a reply to message #179973] Wed, 27 September 2006 06:01 Go to previous messageGo to next message
Eclipse User
Originally posted by: dolpheen.gmail.com

Hello,
I have unchecked the option "Run modules directly from the workspace" from
the Tomcat server in the "Servers" view and also changed the port 8080
using the same.
Now I can get Tomcat welcome page at
http://localhost:8080
Still how to run my index.jsp using this tomcat instance?
(The SampleProject must be in webapps directory of tomcat to ensue such
event, I do not know how eclipse is going to map my SampleProject
directory into webapps)
I was not able to run using,
http://localhost:8080/SampleProject/index.jsp
What I have to do to run the index.jsp directly from Eclipse?
How to avoid the error,
Server Error: No launchable artifact could be found in the selection
Please help.
-Sameer
Re: Error executing JSP page from Eclipse 3.2 WTP [message #180069 is a reply to message #180030] Wed, 27 September 2006 13:49 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1309
Registered: July 2009
Senior Member
To add the project to the server, you can right-click on the Tomcat
server in the Servers view and select "Add and Remove Projects...".
Select the project and click the Add button to move it to the
"Configured projects" column on the right. Then click Finish.
Starting the Tomcat server will first publish the project's webapp to
the server (i.e. put a copy under the "webapps" directory), then start
the server. Once started, the URL you give below should work.

If the project was already added to the server prior to unchecking the
"Run modules directly..." option, you may need to remove and re-add the
project in separate sessions with the "Add and Remove Projects..."
dialog. The publishing code isn't aware of this option and doesn't
"fix" projects that have already been added to the server when this
option is switched.

As Nitin suggests in a separate e-mail, you may be encountering a bug
that's causing your web project not to be recognized as a valid web
project, leading to the "No launchable artifact" error. I can't be sure
if this is your cause, but I have seen this happen due to startup order
of the Web Tools plug-ins. If the "static web project" type appeared in
a list prior to the "dynamic web project" type, the project would be
mistakenly identified as a "static web project" and you would get this
behavior. Some work was done to fix this in WTP 1.5.1, but as noted in
the bug it seems it can still happen.

Cheers,
Larry


Sameer wrote:
> Hello,
> I have unchecked the option "Run modules directly from the workspace"
> from the Tomcat server in the "Servers" view and also changed the port
> 8080 using the same.
> Now I can get Tomcat welcome page at
> http://localhost:8080
> Still how to run my index.jsp using this tomcat instance?
> (The SampleProject must be in webapps directory of tomcat to ensue such
> event, I do not know how eclipse is going to map my SampleProject
> directory into webapps)
> I was not able to run using,
> http://localhost:8080/SampleProject/index.jsp
> What I have to do to run the index.jsp directly from Eclipse?
> How to avoid the error,
> Server Error: No launchable artifact could be found in the selection
> Please help.
> -Sameer
>
Re: Error executing JSP page from Eclipse 3.2 WTP [message #180090 is a reply to message #180069] Thu, 28 September 2006 04:55 Go to previous messageGo to next message
Eclipse User
Originally posted by: dolpheen.gmail.com

Dear Larry,
Thanks a Lot.
The things are working fine.
I followed the guidelines and now I can access the url:
http://localhost:8080/SampleProject/index.jsp
You said about "Startup order of the Web Tools plug-ins".
Where is this order recorded? In a XML file?
How can I change this?
-Sameer
Re: Error executing JSP page from Eclipse 3.2 WTP [message #180112 is a reply to message #180090] Thu, 28 September 2006 12:08 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1309
Registered: July 2009
Senior Member
The startup order isn't something you have much direct control over. It
is conceivable that your undesirable order is somehow related to your
use of the "all-in-one" zip. You might try installing just Eclipse 3.2
and using the update manager to add WTP 1.5 and it's dependencies and
see if that installation has the same problem.

Though the bug says the problem can still happen, there was one fix
applied in WTP 1.5.1 which would likely take care of your instance of
this problem. You could try WTP 1.5.1, which should be available soon
in final form.

Cheers,
Larry

Sameer wrote:
> Dear Larry,
> Thanks a Lot.
> The things are working fine.
> I followed the guidelines and now I can access the url:
> http://localhost:8080/SampleProject/index.jsp
> You said about "Startup order of the Web Tools plug-ins".
> Where is this order recorded? In a XML file?
> How can I change this?
> -Sameer
>
>
Re: Error executing JSP page from Eclipse 3.2 WTP [message #180135 is a reply to message #180112] Thu, 28 September 2006 13:46 Go to previous messageGo to next message
Eclipse User
Originally posted by: dolpheen.gmail.com

Hello,
I am already having eclipse: eclipse-SDK-3.2-win32.zip
As per your suggestion, I have downloaded the file:
wtp-M-1.5.1-200609221939.zip (29.72 MB)
from the download link:
http://ftp.jaist.ac.jp/pub/eclipse/webtools/downloads/drops/ R1.5/M-1.5.1-200609221939/wtp-M-1.5.1-200609221939.zip
I extracted eclipse-SDK-3.2-win32.zip, Eclipse folder got created.
Then I extracted and overrighted the Eclipse folder with files from
wtp-M-1.5.1-200609221939.zip.

Giving path of JDK1.5 by the vm switch I started Eclipse.
To my surprise I am not getting any options related to J2EE in Customize
Perspective.
I also tried eclipse -clean command.
I noticed that after extracting wtp-M-1.5.1-200609221939.zip, I am not
getting any org.eclipse.wst.* packages in the plug-ins folder which do
exists in
wtp-all-in-one-sdk-R-1.5.0-200606281455-win32.zip

How do this come? Have I downloaded a wrong file?

Please comment.

-Sameer
Re: Error executing JSP page from Eclipse 3.2 WTP [message #180143 is a reply to message #180135] Thu, 28 September 2006 14:12 Go to previous message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1309
Registered: July 2009
Senior Member
You need the dependencies too, i.e. emf-sdo-xsd, gef, and jem. You can
use the links found on
http://download.eclipse.org/webtools/downloads/drops/R1.5/M- 1.5.1-200609221939/

In addition, you should be using Eclipse 3.2.1 with WTP 1.5.1. A link
for this is also provided on the page given above. Note that these
aren't quite "final" releases. The release of "final" versions is
targeted to occur 09/29.

Cheers,
Larry

Sameer wrote:
> Hello,
> I am already having eclipse: eclipse-SDK-3.2-win32.zip
> As per your suggestion, I have downloaded the file:
> wtp-M-1.5.1-200609221939.zip (29.72 MB)
> from the download link:
> http://ftp.jaist.ac.jp/pub/eclipse/webtools/downloads/drops/ R1.5/M-1.5.1-200609221939/wtp-M-1.5.1-200609221939.zip
>
> I extracted eclipse-SDK-3.2-win32.zip, Eclipse folder got created.
> Then I extracted and overrighted the Eclipse folder with files from
> wtp-M-1.5.1-200609221939.zip.
>
> Giving path of JDK1.5 by the vm switch I started Eclipse.
> To my surprise I am not getting any options related to J2EE in Customize
> Perspective.
> I also tried eclipse -clean command.
> I noticed that after extracting wtp-M-1.5.1-200609221939.zip, I am not
> getting any org.eclipse.wst.* packages in the plug-ins folder which do
> exists in
> wtp-all-in-one-sdk-R-1.5.0-200606281455-win32.zip
>
> How do this come? Have I downloaded a wrong file?
>
> Please comment.
>
> -Sameer
>
Previous Topic:Prompt for Starting and Stopping server
Next Topic:Including the WTP, XSD, EMF, JEM and GEF as part of our update site?
Goto Forum:
  


Current Time: Thu Oct 23 06:53:23 GMT 2014

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

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