on 03-15-2007 5:49 AM
hi
i want to do a JSP application in NWDS
but there is some problem occurring
i will just brief u with the steps i have performed first
Click File->New->Project.
Select Portal Application from left side select Create a Portal Applicatoin Project from the right side,
click Next.
Name you project.
Click Finish.
If not already in the java perspective, click the little icon on the toolbar on the left hand side which has a "J" in it.
You should see your project in the package explorer.
Open the tree structure, you should see src.api, other stuff and a folder called dist. Open dist.
You should see all kinds of folders.
See the portalapp.xml file, this will be important later.
Put you .JSP files in the Pagelet folder and your images under the images folder.
No go back to the top. Uner the src.api folder, create a package.
Right-click > New> Package, name it(com.yourcompany.test).
Now right click the package and create your classes.
Rightclick -> New --> Other, select Portal Application on left and "Create a new Portal Application Object on right.
Click next, hightlight your project,
click next.
Open the Portal Component Node, select JSPDynpage,
Click next, Name the files...select API for location and click Finish.
after doing all this i m getting 2 errors stating
1> This compilation unit indirectly references the missing type javax.servlet.http.HttpServletRequest
(typically some required class file is referencing a type outside the classpath)
2> The project was not built since its classpath is incomplete. Cannot find the class file for javax.servlet.http.HttpServletRequest. Fix the classpath then try rebuilding this project.
how can i rectify these errors
useful answers will be rewarded
Regards
JM
Hi John,
Try Add using External jars.
Ideally NWDS studio automatically adds these jars as a reference if the wizard is used.
Just a quick thought - have to tried to reorganize the imports?
Rightclick on the sourcecode and click on "Source" -> "Organize Imports"
This all doesnt help means you have to install NWDS again.
Regards, Suresh KB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Abhimanyu and Radhika Kuthiala
i have added the files to my project as per your directions
but i m still facing the problem like
Warning The import com.sapportals.htmlb is never used
Warning The import com.sapportals.htmlb.enum is never used
Warning The import com.sapportals.htmlb.event is never used
i have imported
com.sap.portal.htmlb_api
\...\com..\default\lib\java\htmlb
prtapi.jar
htmlb.jar
htmlb_api.jar
useful answers will be rewarded
Regards
JM
Hi John,
You can add the jars by right clicking on the project name->properties->java build path->addd external jars->browse till
\SAP\IDE\IDE70\eclipse\plugins\com.sap.tc.ap_2.0.0\comp\SAP_JTECHS\DCs\sap.com\com.sapportals.htmlb\_comp\gen\default\public\default\lib\java\htmlb
\SAP\IDE\IDE70\eclipse\plugins\com.sap.ep.applicationDevelopment_7.00\com.sap.portal.htmlb_api
Add both the jars.
In the created JSPDynpage .java file you can add
import com.sapportals.portal.htmlb.page.JSPDynPage;
import com.sapportals.htmlb.page.DynPage;
import com.sapportals.portal.prt.runtime.PortalRuntime;
It should remove the error.
Regards
Radhika Kuthiala
P.s You can award appropriate points for encouragement.:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John,
add prtapi.jar , htmlb_api.jar and htmlb.jar files to your project.
Regards
Abhimanyu L
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The classes reside in the servlet.jar. To be able to use the import, you should add this to your project's build path. You can use the predefined variable that comprises all J2EE standard libs - i.e. access the Properties of your project from the context menu, select Java Build Path -> select the Libraries tab -> press the Add Variable button. There should appear a variable called TSSAP_JAVAX_HOME. Select it, choose Extend button -> browse to lib/servlet.jar and add this to the list of referenced libraries.
This should work.
Greetings,
Praveen Gudapati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Praveen Gudapati
those 2 errors are gone but now a chain of errors have come
The import com.sapportals.htmlb cannot be resolved
The import com.sapportals.htmlb cannot be resolved
The import com.sapportals.htmlb cannot be resolved
The import com.sapportals.htmlb cannot be resolved
The import com.sapportals.portal.htmlb cannot be resolved
PageProcessorComponent cannot be resolved or is not a valid superclass
can you help me to solve these errors also
useful answers will be rewarded
Regards
JM
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.