Writing ASP COM components in Visual J + +

Source: Internet
Author: User
Tags extend
Java is a network-centric programming language, and many tasks that are difficult to accomplish with ASP scripts can be easily implemented in Java. At the same time, the best way to extend ASP applications is to join COM components. So, can you use Java to develop components for ASP? This paper illustrates the specific process of developing COM components in Visual J + + environment through examples.
I. Overview
Since the advent of Java, various development tools, development environment has been emerging. These environments and tools are targeted at different levels of users and have their own advantages. So what are the advantages of using Visual J + + as a Java development platform? Roughly speaking, these advantages include:
A familiar development environment. Many of Microsoft's development tools are very similar in style and usage. Users who are familiar with Visual Basic and Visual C + + development environments can quickly learn to use Visual J + +.
Collaboration with other development environments. For example, Visual J + + can collaborate seamlessly with Visual InterDev, and all HTML, ASP, and JavaScript code can be written in the same environment.
Debugger. One of the most notable advantages of using the integrated development environment (IDE) is that you can use the built-in debugger. As with all other Microsoft development environments, the debugger features of Visual J + + are also very powerful.
Of course, the IDE for Visual J + + also has many other advantages, such as color display of keywords, automatic formatting of code, application of the structure global view, and so on.
Specifically, for those developers who are itching outside the Java gate and don't know where to start, we think that Visual J + + is a very good starting point. However, we know that sun and Microsoft have been disputing the "extension" of Java by the latter. Whether or not we encapsulate Java classes into COM objects, Java programs are a good way to extend ASP applications. However, given that Microsoft private extensions are not likely to be supported by all Java platforms or environments, you should carefully consider using Microsoft's Java Extensions in Visual J + + programming.
Next we will use Visual J + + to create a component that can be used in the ASP environment. This component contains only one method, its argument is a string URL, and the function is to extract and return the contents of the HTML document specified by the URL.
This step-by-step article describes the entire component development process. This includes how to create a project in Visual J + +, enter the necessary Java code, and explain how these Java code works, and how to apply this component within an ASP script.
Note: This article will use Visual J + + 6.0, but you can also use the earlier version of Visual J + +, and when necessary we will point out the differences between the different versions.
Second, create Visual J + + Project
Starts Visual J + +, and the following dialog box appears:
  
"Figure 1"
In this dialog box, select the new project, enter the name of the project Fetchurl and the appropriate working directory, then select the COM DLL icon, and finally click the "Open" button.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.