Convert JSP / JSF to ASP.NET

I have a pretty big JSF web application. I have to convert the application to ASP.NET. I have already converted Java code to C # code manually as well as using JCLA (Microsoft Java Conversion Assistant).

What is the best way to convert parts of JSF to ASP.NET? Is there any tool that can help shorten the job?

For example, convert JSF <t:dataList> to an ASP.NET datagrid or convert panelGroup to asp:panel , etc.

+6
migration jsf
source share
2 answers

I do not know any tools for the shelf to do this.

What I would do in this situation is to convert one component manually and then use it as the basis for a code generation template using CodeSmith . Not fast, but the more you have to convert, the better the gain and has an additional advantage, allowing you to determine conversions for any custom components that you include that have no direct analogues in ASP.NET.

+1
source share

Is this a one-time conversion or part of a larger project to port many applications?

I also did not see anything in this area, so I assume that people took the manual path and implemented their own solutions or simply used the previous application as a template to create a similar structure in ASP.Net.

If I were you, I would do something like:

  • compare the similarities between them and find as many common parts as possible where you can do the conversion

  • write a script / console application to go through and perform the basic conversion

  • look at the output of the pages and repeat steps 1 and 2, you will probably find that with each iteration of the script run you will find something else that you can script so you don't see before

  • it would not be easy to make your script / app converter a little smarter and create a report on the tags / attributes that it found, but you did not take it into account, and this may return to step 1.


The main idea is that you want the script / application to perform the highest possible climb, and you make the settings at the end. You’ll still be testing each page, so make individual page modifications part of this testing process.

You also want to avoid getting into a situation where you spend more time recording the final conversion of the script and configure every possible scenario when many of these scripts are not repeated.

The process might look something like this:

JSF β†’ script / app β†’ Data File β†’ Template System ( CodeSmith ) β†’ ASP.Net

Let us know how you are going, if you create a fairly general script, it may be useful to others who want to do something similar along the track.

Hth feel free to ask questions

+1
source share

All Articles