After looking at many of the major ecommerce sites on the web, I noticed that most are powered by ASP.NET. I have a background in Java and JSP, and I am interested in knowing why the vast majority of ecommerce sites use ASP.NET over JSP or PHP. Are there specific advantages to ASP.NET that make it the clear choice for creating an ecommerce website?
I would disagree on the "majority" part. I don't know what sites you are looking at, but I would imagine Windows-based sites probably don't have a majority market share, although I suppose that's possible. Also I'm not entirely sure what you mean by "e-commerce". Do you mean, say, the Amazon website? B2B solutions?
Both Windows and Linux are stable platforms for large enterprise-class applications. In most cases companies choose technology stacks that reflect their in-house expertise, or go with an OTS (off the shelf) solution provided by a vendor that chose the stack based on the same criteria.
Running an application on Windows is inherently more expensive than Linux - assuming support and maintenance costs are equeal between the two, you still have to pay for licenses. Running an instance of SQL Server accessed by an internet-facing application is also expensive. However, many companies don't necessarily look at those upfront costs as determining whether or not the platform is viable. If you're running a site that handles $100M in revenue per year, $200K of licensing costs is peanuts. Again, generally it comes down to the expertise and experience of the people writing and operating the application.
Also, if you're running a RedHat-based server solution with a support contract with Oracle for the Java bits you're also paying through the nose, even though you're using Open Source software.
So I don't think Java or PHP-based applications have a distinct advantage over .NET-based application or viceversa; rather, pick the technology you know and have experience in. It doesn't matter if you saved a ton of money picking a LAMP stack if your expertise is Java and you're going to end up with an application that is unstable and/or insecure because you didn't know what you were doing.