cancel
Showing results for 
Search instead for 
Did you mean: 

editing a par file

Former Member
0 Kudos

Hi,

I am editing a par file that came from sap. Here are the steps I followed

1. downloaded the par from support -> portal runtime --> browse deplpyment and downloaded it (x.zip)

2. imported this par file into nwds which formed a prioject structuree (for instance "Y" being name of project).

got the following questions:

1. after my import, the jar files which were in (x.zip) were not visible in project structure "Y". should i import them manually?

2. the .properties file's which shows that they are in "\private\classes\" directory are shown in Y -->dist > PORTAL_INF/ classes. why are they not under "Y->dist> portal_inf/ private/classes"?

3. if i wnat to edit this par file, but since it is an sap par file, we dont have resources, so what should i do know. if i extract those jar files and decompile them into .java files, where should i put these source files, should i put them in Y--> src.core/src.api OR Y-> dist --> PORTAL_INF --> srclib.api/srclib.core

please let me know?

4. after editing i can create a par file from File --> Export --> PAR FILE etc.., but will the .jar files in the lib folders get automatically updated?

5. if the par file contains a jsp file, do u think that it would be in pagelet directory when I imported. How to edit that particular .jsp file that is inside a par that came from sap?

6. is there some good blog or any other sort of links which can guide me in editing a par file that comes from sap?

sorry if the questions are silly, but i am facing these problems..

I hoep that some one can help me in this regard.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shiva,

1. Yes u have to add those jar files. Its coz of the bug in NWDS u have to extract the jar files from the par file downloaded and add it to the corresponding folder in the project structure.

2. I am not sure of the reason.

3. The only editing that SAP advices is changing the lokk and feel. SAP would not provide the source files. So if u want to change the funtionality, its always better to create ur own projetc other than editing the par file.

4. Yes, what ever the changes u made wiil be added to the project u have created and will be deployed to the server as a par file.

5.The JSP wiil be either in paglet or in jsp folder in the project structure. You can edit it through NWDS.

6.http://service.sap.com/ep60howtoguides

Try this link there is a pdf describing how to change the logon screen of the EP.

Hope this Helps

gEorgE

Former Member
0 Kudos

Hi George and Geogi,

Thanks for the replies.

1. jsps editing is clear to me.

2. bug of nwds while importing the par files is also clear. so i will do it manually.

3. i have already customized login page. it was just editing .jsp file, so there were no problems for me.

I didnt still understand the following.

George, as you told that SAP allows only to edit JSP files, but i want to edit the class files, becuase i need to add say a "system.out.println()" statement in a particular component of the par file.

To do this

1. Extract the jar file to find all the class files and decompile them to form ".java" files. am i correct?

2. after acquiring the .java files, where should i put these ".java" files in the project structure whether under Y--> src.core/src.api OR Y -> dist --> PORTAL_INF --> srclib.api/srclib.core (Y being the project name).

currently I placed them under Y --> src.api and Y -->src.core. but with a lot of compilation errors. few of them being the import statements

import com.sap.portal.admin.editor.*;

import com.sapportals.htmlb.*

import com.sapportal.common.*

(I know that this is due to some jar files missing in classpath of project BuildPath, but where can i find them is the question , i.e. as you know there are many jar files in the EP installation, why didnt they come with NWDS by default? How can i find the jar file of particular packages )

3. would be nice if someone have a a guide for editing .class files that comes with pars or some good blogs.

Please help me in this regard.

Thank you

Message was edited by: shiva shiva

detlev_beutner
Active Contributor
0 Kudos

Hi Shiva,

1.) Yes, you're correct.

2.) Under Y--> src.core/src.api

> with a lot of compilation errors

[...]

> but where can i find them is the question

As you said, you will need to extend the projects classpath. The best tool or doing so in a few minutes is the ClassLocator tool. Also search for this term on SDN to find more details.

Hope it helps

Detlev

PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance!

Former Member
0 Kudos

Hi Detlev,

Thank you for the reply. I will search for class locator and have it installed.

Could you please clarify me the following

1. when are the files normally created under PORTAL_INF > srclib.api/srclib.core as we are always using Y>src.core/ src.api

2. Ok, after setting the classpath and after doing my changes and compiling it. Will it update the jars available in portalinf->lib (XYZapi.jar) and in the portalinf->private->lib (XYZcore.jar). or should i create the jars explicitly.

What i think is that creating a par file from the context menu of the project would create the jars by default, am i right?

Hmm will dowload class locator and will try to remove the compilation errors in mean time

Thank You

detlev_beutner
Active Contributor
0 Kudos

Hi Shiva,

> when are the files normally created under

> PORTAL_INF --> srclib.api/srclib.core

> as we are always using Y-->src.core/ src.api

As far as I have observed... surprise surprise... never ever. The folder just represent the folder which can be found inside a built PAR when you've selected also to "Include the source code of the portal application". But only within the PAR, not into the projects folder.

On the other side, when you import such a PAR, the JAVA files again are imported into src.core / src.api again.

Maybe it's just for the case that you want pass some source code for the application, on which in fact no hand should be layed on.

> [...] Will it update the jars available

> in portalinf->lib (XYZapi.jar)

> and in the portalinf->private->lib (XYZcore.jar).

> or should i create the jars explicitly.

Again, as above. If you create the PAR, the JARs will be passed into these folders, but not within the project. Again, you are able to add external JARs into these folders. Anyhow, you can also add them into corresponding "exlib" folders to distuingish between portal application JARs and external (used) JARs.

> creating a par file from the context menu of the

> project would create the jars by default, am i right?

Yes, but as said, they are only built into the PAR, not within the project's folders.

Hope it helps

Detlev

Former Member
0 Kudos

Thank you Detlev for clarification

Thank you

P.S. granted points

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi shiva

The jar files may not be added automatically. You can add these manually in to the lib folders.When you are exporting the par files these jar files are included.

In the portalinf->lib add the ...api.jar and in the portalinf->private->lib add ..core.jar. You can get these jar by extracting the par file.

You can edit the jsp files after you import the par file in to NWDS.Here you are having the JSP folder containing all the jsp files in the par.

Regards

Geogi

Message was edited by: Geogi Luke