Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Unable to access servlet when deployed on Tomcat
Unable to access servlet when deployed on Tomcat [message #82178] Thu, 10 April 2008 07:12 Go to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Hi all,

Recently I've tried to deploy our RAP application to Tomcat.
We use browser widget pointing to a servlet in our welcome view which
works fine under Jetty, but in Tomcat it throws something like unable to
find the servlet.

To register servlet we have defined it in our plugin.xml:

<extension id="com.fearnot.ui.resources"
point="org.eclipse.equinox.http.registry.resources">
<resource alias="/web" base-name="/web"/>
</extension>

<extension id="com.fearnot.ui.servlets"
point="org.eclipse.equinox.http.registry.servlets">
<servlet alias="/fes" class="com.fearnot.ui.servlets.MainServlet"
load-on-startup="true"/>
</extension>

I suspect that I can't deploy application with internal browser widget to
Tomcat as it is.

Do I have to move the declaration above to the web.xml ?

Any help would be greatly appreciated.

Best Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82246 is a reply to message #82178] Thu, 10 April 2008 10:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

there should be no difference in servlet registration for deployment on
tomcat. Probably your deployment archive isn't correct. Please take a
look at the log entries and follow the thread regarding deployment of
RAP applications in this newsgroup.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Setya [mailto:jsetya@gmail.com]
Bereitgestellt: Donnerstag, 10. April 2008 09:12
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Unable to access servlet when deployed on Tomcat
Betreff: Unable to access servlet when deployed on Tomcat


Hi all,

Recently I've tried to deploy our RAP application to Tomcat.
We use browser widget pointing to a servlet in our welcome view which
works fine under Jetty, but in Tomcat it throws something like unable to
find the servlet.

To register servlet we have defined it in our plugin.xml:

<extension id="com.fearnot.ui.resources"
point="org.eclipse.equinox.http.registry.resources">
<resource alias="/web" base-name="/web"/> </extension>

<extension id="com.fearnot.ui.servlets"
point="org.eclipse.equinox.http.registry.servlets">
<servlet alias="/fes" class="com.fearnot.ui.servlets.MainServlet"
load-on-startup="true"/>
</extension>

I suspect that I can't deploy application with internal browser widget
to Tomcat as it is.

Do I have to move the declaration above to the web.xml ?

Any help would be greatly appreciated.

Best Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82340 is a reply to message #82246] Fri, 11 April 2008 06:01 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Frank,

> there should be no difference in servlet registration for deployment on
> tomcat. Probably your deployment archive isn't correct. Please take a
> look at the log entries and follow the thread regarding deployment of
> RAP applications in this newsgroup.

I've followed tutorial written by Elias here :
http://rapblog.innoopract.com/2007/12/rap-deployment-part-2- deploying-your.html

Actually the application is successfully deployed, I've inspected the OSGI
console and all bundles are started. But when browser widget in our
viewpart try to access url '/fes', it says 'The requested resource (/fes)
is not available'.

BTW, which log entries are you talking about ?

Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82368 is a reply to message #82340] Fri, 11 April 2008 08:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

are you sure that your build.properties file contains the plugin.xml?
That's a common mistake.

Besides the common logs available at the tomcat's log directory, there
is a log in case of problems written by equinox at '<path to your tomcat
installation>\work\Catalina\localhost\<RAP
application>\eclipse\workspace\.metadata\.log'


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Setya [mailto:jsetya@gmail.com]
Bereitgestellt: Freitag, 11. April 2008 08:02
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Unable to access servlet when deployed on Tomcat
Betreff: Re: Unable to access servlet when deployed on Tomcat


Frank,

> there should be no difference in servlet registration for deployment
> on tomcat. Probably your deployment archive isn't correct. Please take

> a look at the log entries and follow the thread regarding deployment
> of RAP applications in this newsgroup.

I've followed tutorial written by Elias here :
http://rapblog.innoopract.com/2007/12/rap-deployment-part-2- deploying-yo
ur.html

Actually the application is successfully deployed, I've inspected the
OSGI console and all bundles are started. But when browser widget in our
viewpart try to access url '/fes', it says 'The requested resource
(/fes) is not available'.

BTW, which log entries are you talking about ?

Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82395 is a reply to message #82368] Fri, 11 April 2008 10:42 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Frank,

> are you sure that your build.properties file contains the plugin.xml?
> That's a common mistake.

This is the content of my build.properties :

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
web/,\
plugin.properties

The web/ folder contains all the web stuff like jsp and WEB-INF folder.

> Besides the common logs available at the tomcat's log directory, there
> is a log in case of problems written by equinox at '<path to your tomcat
> installation>workCatalinalocalhost<RAP
> application>eclipseworkspace.metadata.log'

The log from catalina just show the Tomcat startup process and no .log
file produced under .metadata folder.

Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82455 is a reply to message #82395] Fri, 11 April 2008 13:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

at the moment I'm running a little bit out of options. What is the exact
URL you are using to access the application on tomcat?


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Setya [mailto:jsetya@gmail.com]
Bereitgestellt: Freitag, 11. April 2008 12:42
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Unable to access servlet when deployed on Tomcat
Betreff: Re: Unable to access servlet when deployed on Tomcat


Frank,

> are you sure that your build.properties file contains the plugin.xml?
> That's a common mistake.

This is the content of my build.properties :

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
web/,\
plugin.properties

The web/ folder contains all the web stuff like jsp and WEB-INF folder.

> Besides the common logs available at the tomcat's log directory, there

> is a log in case of problems written by equinox at '<path to your
> tomcat
> installation>workCatalinalocalhost<RAP
> application>eclipseworkspace.metadata.log'

The log from catalina just show the Tomcat startup process and no .log
file produced under .metadata folder.

Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82483 is a reply to message #82455] Fri, 11 April 2008 13:25 Go to previous messageGo to next message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Frank,

> at the moment I'm running a little bit out of options. What is the exact
> URL you are using to access the application on tomcat?

The code to access the servlet is like the following :

public void createPartControl(Composite parent)
{
...
browser.setUrl("/fes?mode=login");
...
}

One other possibility crossed in my mind, is it possible that I include
too many plugin jars in the feature.xml that interferes with Tomcat's ?

Here's our list of plugins in the feature.xml:

org.eclipse.equinox.http.registry
org.eclipse.core.contenttype
org.eclipse.equinox.registry
org.eclipse.rap.rwt
org.eclipse.core.runtime.compatibility.auth
org.eclipse.osgi
org.eclipse.rap.ui
org.eclipse.rap.ui.forms
org.eclipse.rap.ui.workbench
org.eclipse.core.jobs
org.apache.commons.logging
org.eclipse.equinox.common
org.eclipse.rap.ui.views
com.farbeyond.ui
org.eclipse.core.commands
org.eclipse.core.runtime
org.eclipse.core.expressions
org.eclipse.rap.jface
org.eclipse.equinox.app
org.eclipse.equinox.preferences
org.apache.commons.el
org.eclipse.osgi.services
org.eclipse.equinox.http.servlet
com.farbeyond.core
org.eclipse.equinox.http.servletbridge
org.eclipse.update.configurator
javax.servlet.jsp
org.eclipse.equinox.jsp.jasper.registry
org.eclipse.equinox.jsp.jasper
org.apache.jasper

Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82544 is a reply to message #82483] Fri, 11 April 2008 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi again,

this reminds me at a thread about the file upload widget that uses a
seperate servlet for the actual upload. A similar problem was reported
and a nice guy proposed a solution which would adapted to your case look
like this:

String application = RWT.getRequest().getContextPath();
application = application.trim();
browser.setUrl(application + "/fes?mode=login");

Maybe this helps in your case too.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Setya [mailto:jsetya@gmail.com]
Bereitgestellt: Freitag, 11. April 2008 15:26
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: Unable to access servlet when deployed on Tomcat
Betreff: Re: Unable to access servlet when deployed on Tomcat


Frank,

> at the moment I'm running a little bit out of options. What is the
> exact URL you are using to access the application on tomcat?

The code to access the servlet is like the following :

public void createPartControl(Composite parent) { ..
browser.setUrl("/fes?mode=login");
...
}

One other possibility crossed in my mind, is it possible that I include
too many plugin jars in the feature.xml that interferes with Tomcat's ?

Here's our list of plugins in the feature.xml:

org.eclipse.equinox.http.registry
org.eclipse.core.contenttype
org.eclipse.equinox.registry
org.eclipse.rap.rwt
org.eclipse.core.runtime.compatibility.auth
org.eclipse.osgi
org.eclipse.rap.ui
org.eclipse.rap.ui.forms
org.eclipse.rap.ui.workbench
org.eclipse.core.jobs
org.apache.commons.logging
org.eclipse.equinox.common
org.eclipse.rap.ui.views
com.farbeyond.ui
org.eclipse.core.commands
org.eclipse.core.runtime
org.eclipse.core.expressions
org.eclipse.rap.jface
org.eclipse.equinox.app
org.eclipse.equinox.preferences
org.apache.commons.el
org.eclipse.osgi.services
org.eclipse.equinox.http.servlet
com.farbeyond.core
org.eclipse.equinox.http.servletbridge
org.eclipse.update.configurator
javax.servlet.jsp
org.eclipse.equinox.jsp.jasper.registry
org.eclipse.equinox.jsp.jasper
org.apache.jasper

Regards,

Setya
Re: Unable to access servlet when deployed on Tomcat [message #82830 is a reply to message #82544] Mon, 14 April 2008 12:22 Go to previous message
Setya Nugdjaja is currently offline Setya NugdjajaFriend
Messages: 567
Registered: July 2009
Senior Member
Frank,

> String application = RWT.getRequest().getContextPath();
> application = application.trim();
> browser.setUrl(application + "/fes?mode=login");

Works like a charm.

Thank you so much.


Best Regards,

Setya
Previous Topic:Split of RWT into host and fragment
Next Topic:Double & in setPartName
Goto Forum:
  


Current Time: Tue Apr 30 01:22:52 GMT 2024

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

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

Back to the top