migration from struts 1.2 to JSF + PF

UI Components for JSF
Post Reply
timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

19 Jul 2010, 11:06

A consultant company give us a presentation about Oracle ADF recently. Since my office runs heavily on oracle, it is possible that sooner or later management will adopt ADF.
Now, most of IT people here are Oracle Form/PL-SQL people. In fact, my sub-department is the only one who has application running on java.

Currently, we have 2 applications running on java. One was built on 2003, using Struts 1.2, while the other -built on 2009- use JSF 1 + Trinidad + JSP.

The 1st application, which was built using struts, constantly developed, and sometimes new module added. However, since we rely heavily on Oracle, all the business process and workflow are using Oracle Workflow/PL-SQL. The java thing basically used for user interface, and using pure JDBC, we initiate PL-SQL proc or oracle workflow.

Now, since we developed 2nd application using JSF + Trinidad, we do understand that develop UI using struts is painful. And when I found PF, developing UI is much easier.

Right now, we has another module on 1st application. This module mostly used for view only, with minimal insert/update transaction. Thus I want to suggest to my manager to use PF to make UI development a lot faster. However, I wonder can JSF + PF run pararell with Struts 1.2?

On 1st application, we use JDK 1.4 + Tomcat 4. Of course, theorically:
1. I have to upgrade to JDK 1.6 + Tomcat 6 to comfort JSF specs.
2. I have to configure web.xml to redirect all url-pattern *.faces to Faces Servlet
3. Create faces-config.xml
4. On menu page, we create link to PF with href (some_page.faces), while old menu (some_page.do) remain still
5. It will runs smoothly :)

But I wonder is that the correct step, will struts servlet and faces servlet crash? Or struts-config.xml (a lot of struts-config.xml) and faces-config.xml crash? Or any other issue.

When this runs correctly, we can slowly moves all ActionForm and Action into POJO (hopefully).

Do you ever face any migration issue like this?
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

19 Jul 2010, 13:59

Hello,

We also have a couple of Struts 1.2.6 apps, build on 2003 and a JSF 1.1 app (RichFaces) build on 2008 :-) Two weeks ago I finished a JSF 2 app with PrimeFaces which runs together with Struts apps in the same container. We have tried WebLogic 9.x / JBoss 5.x and Struts 1.2 + JSF 2 run smoothly in the same app server. No problem at all (sure, you have to prepare app server with JSF 2 and new EL libs). The old JSF 1.1 app runs in the other app server instance (well-known JBoss's classloader problem).
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

20 Jul 2010, 03:14

thanks oleg
do your application run on same context path? Because my plan is have both JSF + Struts refer to same context path, only configured differently on web.xml <url-pattern>?
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

20 Jul 2010, 10:16

Hi.

The context is not the same. The host and port are the same.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

21 Jul 2010, 03:08

@oleg
what do you think if i'll use PF + struts for same context path?
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

21 Jul 2010, 09:49

How will it work? Each web app should have its own context path.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

22 Jul 2010, 02:57

I'm thinking about configure different handler at web.xml for different <url-pattern>
all *.do goes to struts handler, while *.jsf goes to jsf handler
I haven't try it yet, but theoretically it should be fine
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

22 Jul 2010, 11:40

Yes, for different url-patterns, I don't see why not.

sirAlexander
Posts: 1
Joined: 28 Jan 2012, 17:14

28 Jan 2012, 17:28

timotius_pamungkas wrote:I'm thinking about configure different handler at web.xml for different <url-pattern>
all *.do goes to struts handler, while *.jsf goes to jsf handler
I haven't try it yet, but theoretically it should be fine

- Hi timotius, would you please post an update on how you managed the above configuration. Been trying to achieve the same thing ,, but am not having any luck.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 46 guests