How to create web modules?

zmarcoz

New member
Joined
Dec 7, 2012
Messages
1
Programming Experience
1-3
I know VB.net and I use modules a lot in VB desktop application. Now I need start to build my web application by using VB ASP.net (VS2010). I want to do some very simple calculation and then display the result. However, I don't see "Add a new module" option in VB ASP.net. Does "module" exist in VB ASP.net? Is it called other name? Thanks . PLease help
 
VB ASP.net (VS2010)
Your profile says .Net 2.0, maybe update that? .Net 4 is default for VB 2010.
I don't see "Add a new module" option in VB ASP.net. Does "module" exist in VB ASP.net?
It does, in the Code templates. Mind you, Module is basically just a class with all members shared, it is not useful for writing object oriented code, and even less useful in ASP environment where it is more rare to share state between clients and where there also exists ASP specific features like Application state for global storage.
 
Steps for creating Web Module ?>
1.
From any perspective, click File > New > Project > Web > Dynamic Web Project ... then click next.
2. In the New Web Module wizard, enter the Project Name of 'WebProject'.
3. Click Next to go to Select Project Facets Page. You can install additional factets and bind to a runtime.
4. Click Next to go to Settings Page. You can overwrite the default settings here.
5. Click Finish on New Web Module wizard. Your project and Web module have now been created.
6. After the wizard finishes, if you are not already in the J2EE perspective, you will be prompted to switch agree by selecting 'Yes'.
In the J2EE perspective you will see the "WebModule" in the Project Explorer.
7. After expanding take special notice of the modules which have been created. The WebModule folder (as well as the contained WebContent/META-INF, WEB-INF, JavaSource folders) which represents the
Web module.
8. Next create a Test java class in the Web Modules source folder 'JavaSource'. Defaults are provided in the following image. Manually build if you have auto-build turned off.
9. Switching now to the Resource perspective the ouput of the builder can be verified. In the Navigator, you will see all resources as they exist on disk.
After expanding the Java Project you will notice a'.deployables' folder. This folder represents the deployable output (J2EE spec compliant) generated via the Component Structural Builder.
10. After expanding take notice of the modules under the .deployables. You will now see one representing the 'WebModule'. In the WebModule, take special notice of the WEB-INF/classes/sample/Test.class representing the correct runtime output location for classes created in a web's JavaSource.
Also insure the web.xml and Manifest.mf are in the correct locations.
 
Back
Top