Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Tomcat + RAP
Tomcat + RAP [message #1129941] Wed, 09 October 2013 04:54 Go to next message
Igor Zapletnev is currently offline Igor Zapletnev
Messages: 32
Registered: September 2012
Member
Hello,

I am trying to setup RAP application on my tomcat server.
RAP demo application work properly from my eclipse.

After that I am exporting warproduct via eclipse. I am using next demo war product configuration:

	<?xml version="1.0" encoding="UTF-8"?>
	<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
	<web-app id="WebApp">
	  <servlet id="bridge">  
	    <servlet-name>equinoxbridgeservlet</servlet-name>
	    <display-name>Equinox Bridge Servlet</display-name>
	    <description>Equinox Bridge Servlet</description>
	    <servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
	
	    <init-param>
	      <param-name>enableFrameworkControls</param-name>
	      <param-value>false</param-value>      
	    </init-param>

	    <init-param>
	      <param-name>commandline</param-name>
	      <param-value>-registryMultiLanguage -console -ws rap</param-value>     
	    </init-param>
	
	    <load-on-startup>1</load-on-startup>    
	  </servlet>
	  
	  <servlet-mapping>
	    <servlet-name>equinoxbridgeservlet</servlet-name>
	    <url-pattern>/*</url-pattern>
	  </servlet-mapping>
	
	</web-app>


After copying builded war file "controls.war" (depends on file name or not?) into webapps dir and I am getting 404 error "The requested resource is not available.".

I have checked troubleshooting page, my war file does not contains jetty plug-ins as well.

Also where is not ".log" file in the ws directory ".../apache-tomcat 6.0.37/work/Catalina/localhost/controls/eclipse/workspace/.metadata/"

I have found an advice on troubleshoouting page: "type ss in the console and see if all bundles are started. If not try starting them with "start <bundle-id>". The stack traces may hint to what is missing".
Looks like at first I need to specify OSGI remote port and connect to it via telnet. I have added "osgi.console=5471" in launch.ini (don't sure that it is correct place) and error occurs during connection telnet: Unable to connect to remote host.

Also I am removing my application work directory before re-deploying ".../work/Catalina/localhost/work/controls".

So, now I have 404 error and have no any logs/error. Could please help to find the main issue?

Thanks,
Igor



Re: Tomcat + RAP [message #1130210 is a reply to message #1129941] Wed, 09 October 2013 10:15 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan Furnadjiev
Messages: 1839
Registered: July 2009
Senior Member
Hi Igor,
if you are running your Tomcat server locally you could type the OSGi
commands in the Tomcat console window (I saw that you enabled the OSGi
console). What is the output of "ss" command (please post it here)? Do
you have non active plugins? How do you access your app?
http://<host>:<port>/<war_name>/<entrypoint_servlet_path>?
HTH,
Ivan

On 10/9/2013 7:54 AM, Igor Zapletnev wrote:
> Hello,
>
> I am trying to setup RAP application on my tomcat server.
> RAP demo application work properly from my eclipse.
>
> After that I am exporting warproduct via eclipse. I am using next demo
> war product configuration:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
> <web-app id="WebApp">
> <servlet id="bridge">
> <servlet-name>equinoxbridgeservlet</servlet-name>
> <display-name>Equinox Bridge Servlet</display-name>
> <description>Equinox Bridge Servlet</description>
> <servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class>
>
> <init-param>
> <param-name>enableFrameworkControls</param-name>
> <param-value>false</param-value> </init-param>
>
> <init-param>
> <param-name>commandline</param-name>
> <param-value>-registryMultiLanguage -console -ws
> rap</param-value> </init-param>
>
> <load-on-startup>1</load-on-startup> </servlet>
> <servlet-mapping>
> <servlet-name>equinoxbridgeservlet</servlet-name>
> <url-pattern>/*</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
>
> After copying builded war file "controls.war" (depends on file name or
> not?) into webapps dir and I am getting 404 error "The requested
> resource is not available.".
>
> I have checked
> http://wiki.eclipse.org/RAP/FAQ#Exported_WAR_file_does_not_work, my
> war file does not contains jetty plug-ins as well.
> Also where is not ".log" file in the ws directory ".../apache-tomcat
> 6.0.37/work/Catalina/localhost/controls/eclipse/workspace/.metadata/"
>
> I have found an advice on troubleshoouting page: "type ss in the
> console and see if all bundles are started. If not try starting them
> with "start <bundle-id>". The stack traces may hint to what is missing".
> Looks like at first I need to specify OSGI remote port and connect to
> it via telnet. I have added "osgi.console=5471" in launch.ini (don't
> sure that it is correct place) and error occurs during connection
> telnet: Unable to connect to remote host.
>
> Also I am removing my application work directory before re-deploying
> ".../work/Catalina/localhost/work/controls".
>
> So, now I have 404 error and have no any logs/error. Could please help
> to find the main issue?
>
> Thanks,
> Igor
>
>
>
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Tomcat + RAP [message #1131170 is a reply to message #1130210] Thu, 10 October 2013 08:59 Go to previous message
Igor Zapletnev is currently offline Igor Zapletnev
Messages: 32
Registered: September 2012
Member
Hi Ivan,

You was right I used incorrect application path http://<host>:<port>/<war_name> instead of http://<host>:<port>/<war_name>/<entrypoint_servlet_path>.

Thanks!
Previous Topic:How to change themes per-user?
Next Topic:Application Freeze occasionally
Goto Forum:
  


Current Time: Thu Oct 23 19:58:04 GMT 2014

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

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