File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes Integrating Wicket & Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Integrating Wicket & Struts" Watch "Integrating Wicket & Struts" New topic
Author

Integrating Wicket & Struts

Eric Lemaitre
Ranch Hand

Joined: Jul 03, 2004
Posts: 538

Hi all,

I have a legacy Struts application, and I want to use Strut for all legacy pages and Wicket for a new one.
So I made the project, it works as a standalone context with Tomcat, Wicket is a Filter of course, so nothing should prevent me logically from using both Struts as a Servlet & Wicket as a Filter in the same Tomcat container.

Wicket relevant code is:
public class TEST_Application extends WebApplication
{
// Wicket method which allows to initialize the Web Application
public void init()
{
super.init();
// Keep windows titles tidy
getMarkupSettings().setStripWicketTags(true);
mountBookmarkablePage("/project/test/page", Page.class);
}
}

JSP menu index.jsp is:
"/project/test/page"

WEB.xml is:
<filter>
<filter-name>PROJECT</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>package.TEST_Application</param-value>
</init-param>
<init-param>
<param-name>configuration</param-name>
<param-value>development</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>PROJECT</filter-name>
<url-pattern>/project/test/page*</url-pattern>
</filter-mapping>

But it looks like there is no way the Filter is recognized, each time I attempt to access the new page I get a 404 NOT FOUND error "The requested resource (/project/test/page) is not available".

Of course I made many tests changing Filter's "url-pattern" without any success.

Has someone any idea of what could be wrong?

Best regards.


Eric LEMAITRE
CNAM IT Engineer, MS/CS (RHCE, RHCX, SCJA, SCJP, SCJD, SCWCD, SCBCD, SCEA, Net+)
Free Online Tutorials: http://www.free-tutorials-online.net/
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

I'm not a Struts and Wicket expert but as far as I remember, Wicket uses HTML files as its view technology and it looks to me that you are mounting JSP file.
If I were you, I would check it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Integrating Wicket & Struts