plain JSP in a ASP.NET page

G

Guest

ok, I'm very new to ASP, but familiar with .NET via forms. My company has a
fairly large JSP web site, and long term they want to convert it to ASP.net
because of various reasons. Anyway, short term, they want to "transition"
to ASP.net, which means make the main pages .aspx, somehow incorporate the
jsp pages within the ASP pages, and begin gradually converting the jsp pages
to ASP pages. So to start out with, there would be 25% ASP and 75% JSP and
then eventually it would be 100% ASP (maybe a year from now).
Question: Is it possible to "incorporate" a JSP page within an ASP.net page?
How does security come into play here?
 
F

Flip

fairly large JSP web site, and long term they want to convert it to
Are you in Ontario? I have a lot of jsp experience but am now moving to C#
too! :> I much prefer doing work in C#/.NET than anything java.
Question: Is it possible to "incorporate" a JSP page within an ASP.net
page?
There isn't anything AFAIK that will get IIS natively to understand JSPs.
However, what you could do, is setup IIS to forward JSP requests to your JSP
server (Apache, Tomcat?), and setup your transition strategy to convert the
lowest pages (or the highest) to ASPX. If you do a mix (pages in the middle
of your website) then passing off of variables can get complicated (if you
use the URL there's the 2k limit for one, security for another :<). Also
calling servlets from ASPX can be done, getting session variables I don't
think can be done. From the other side, you won't be able to have your JSP
pages responding to button clicks natively.

So, IMHO one strategy would be to have your website go through IIS, and have
a solid transition and variable passing strategy. Passing variables in a
session won't work, so either you setup something custom or use the
url/querystring. Just some thoughts.
How does security come into play here?
It's different in .net 1.1 and 2.0, and very different from JSP security. :<
I hate JSP security. I believe .net 2.0 is going the java way, but I'm sure
there will be MUCH better docs for it.

Good luck.
 
G

Guest

What do you mean by "the lowest pages"? Thanks for the great advice. And
no, I'm not in Ontrario, sorry.
 
F

Flip

What do you mean by "the lowest pages"? Thanks for the great advice.
Sorry for the confusion. I meant if you were to have the index.jsp as the
top of the tree, and the rest of your jsp pages fanning down out from there.
So then, pick on leaf/jsp, and start working upwards with new aspx pages.
That way, you can handle isolated jsps and their associated servlets one at
a time. When you convert the jsp to aspx, you can write the button handlers
as well (to replace the servlets). That way, you would only ever be
bridging one jsp to aspx gap at any one time and hopefully you can do this
with the querystring (url) or maybe even with your db. The bad thing is
you'll always be doing that bridge from jsp to aspx until you complete the
whole app. What's another way? Take one entire sub tree and convert it to
aspx, but from the top level (index.jsp I assume) you're starting with a
jsp, so either way, you're going to have this issue to contend with

After thinking about it a bit, the first thing to handle is probably taking
a look at some global utilities and maybe your data layer and convert that
stuff over first. Are you using an Oracle or MS db? Are you using EJBs?
Custom tags? What about a lot of utility/static methods/classes? You might
be able to get away with moving those bigger pieces over to .net code when
you run into them.
no, I'm not in Ontrario, sorry.
Too bad. :< Oh well, c'est la vie I guess. Good luck! :>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top