0

i have an application based on Eclipse RWT (standalone version). It's a rather complex enterprise application involving Spring dependency injection and a lot of frameworks to be initialized at startup.

Currently I'm in need of a second view on the whole thing. The initialization stuff is a bit complex and I want to reuse it. Further I don't want to deploy a second webapp on my Tomcat. Is it possible to implement two EntryPoints and bind each of them to a separate url-pattern?

e.g.

url-pattern /first entryPoint com.example.myapp.FirstEntryPoint

url-pattern /second entryPoint com.example.myapp.SecondEntryPoint

Is this possible or do you have any alternative approaches to achieve this?

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
BaSche
  • 394
  • 1
  • 6

1 Answers1

5

Okay, no replies just a downvote :D. Anyways i found a solution:

It seems that this cannot be achieved with RAP 1.4. The url-pattern is defined independently from the entrypoints in de deployment-descriptor.

But with RAP 1.5 it is pretty easy: You use an ApplicationConfiguration where you can bind different entrypoints to different url-patterns...

application.addEntryPoint("/start", MyEntryPoint.class, properties);
application.addEntryPoint("/admin", MyAdminEntryPoint.class, properties);

you just need to bind the RapServlet to all used url-patterns in the web.xml.

<servlet>
    <servlet-name>RAPServlet</servlet-name>
    <servlet-class>org.eclipse.rwt.internal.engine.RWTDelegate</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>RAPServlet</servlet-name>
    <url-pattern>/start</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>RAPServlet</servlet-name>
    <url-pattern>/admin</url-pattern>
</servlet-mapping>

Hope it helps...

BaSche
  • 394
  • 1
  • 6
  • This solved my issue in 2018. I'm trying to work with Eclipse RAP. If one uses an ApplicationConfiguration with multiple entry points added for the application the servlet must be bound to all the entry points. – Xaltotun Sep 14 '18 at 09:38