cancel
Showing results for 
Search instead for 
Did you mean: 

Problems in creating war files from NWDS

neha_mahanty
Active Participant
0 Kudos

HI All,

I am working in enhancements of MAU application.

I have some questions regarding the creation of war files from NWDS.

1. I am trying to create the war file from NWDS.

While exporting I am selecting "Add JSP as compiled classes" and my application is not running because my .war file does not contains any source files (.class files) if I select this option.

Note :- if I am not selecting JSP as compiled classes my .war gets generated properly and application runs properly.

My question is , is there any problem which NWDS is giving ? I am using NWDS version 7.0.0.1 . Any idea how to overcome this?

Thanks and Regards

Neha Mahanty

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Usually when you generate a .War file by chosing option "Add JSP as precompiled classes", all generated classes will be put into a jar file and this you can find out from folder
webapps\applicationfolder name\web-inf\lib".

Do check if there is any jar file created with the application name which contains precompiled JSP's. If they are present and still you are not able to run the application, then I would say there is a problem with web.xml file you are using.

Atleast with my past expereince, the web.xml file is different for precompiled jsp's and normal jsp's. With precompiled JSP's there will be correct path of .class file mentioned in web.xml file but where as in normal jsp's there will not be any path but the client runtime will search for the .jsp file in folder and creates one class file in WORK folder.

Hope it helps.

Best Regards,

Siva.

neha_mahanty
Active Participant
0 Kudos

Thanks Siva.

I checked my application, yes the jar file is getting created with my application name in the lib folder. I have a little confusion with this web.xml file.

you said that " With precompiled JSP's there will be correct path of .class file mentioned in web.xml file but where as in normal jsp's there will not be any path but the client runtime will search for the .jsp file in folder and creates one class file in WORK folder."

I checked my web.xml its like

ex:- <servlet>

<servlet-name>mam_0005fstart</servlet-name>

<jsp-file>/mam_start.jsp</jsp-file>

</servlet>

so should I change the web.xml file to

<servlet-class>mam_0005fstart</servlet-class> instead of <jsp-file>>/mam_start.jsp</jsp-file>

I don know If I can change web.xml. please explain me this.

Thanks and Regards

Neha Mahanty

Former Member
0 Kudos

Hi,

You are correct. When you are using precompiled JSP's you need to specify the servlet class names like <servlet-class>mam_0005fstart</servlet-class>.

But before that are you sure that your JSP's are compiled properly and put into the jar file. The reason why I am asking is there might be problem with compiling JSP's itself.

Hope it helps.

Best Regards,

Siva.

Former Member
0 Kudos

Hello,

We at development have had some similar issues lately. Could you please specify which JDK you use on your project?

We found that there is an incompatibility between MAM/MAU JSP's and JDK 1.5 and up. It relates to Sun having changed jsp parser from Crimson to Xerces....

If you are using 1.5, try with jdk 1.4 or lower...

Hope this helps,

Mathieu

Edited by: Mathieu Sauve on Jul 21, 2008 8:05 PM

neha_mahanty
Active Participant
0 Kudos

Hi All,

When I am creating the war file with precompile jsp option, my war file is not getting generated properly. It has some errors.

Error: The content of element type "web-app"must match"(icon?,display-name?,description?,distributable?,context-param,servlet,servlet-mapping,session-config,mime-mapping)

And regarding my jdk I am using jdk1.4. So is this problem related to NWDS??

Note: I am able to run the application if I do not select the precompile option

any idea how resolve this??

Thanks and Regards

Neha Mahanty

Former Member
0 Kudos

Hi Neha,

Could you resolve the problem? I am stuck up with the same problem and am looking for a possible solution. Irony is *.Java files have been created for the corresponding JSP's earlier but however am facing the problem while deploying the war file created

Thanks & Regards,

Kalyan

Former Member
0 Kudos

Hi All,

Found a solution for the problem

Take a back up of ur workspace for NWDS and then delete the existing workspace available under user_name\Documents\SAP

Now reopen NWDS and import ur project into the new workspace.

Now start exporting the war file for the application. You can see the *.Java files created under $Jsp folder.

I exactly don't know the reason for this behaviour but this has worked fine in my case

Regards,

Kalyan

neha_mahanty
Active Participant
0 Kudos

Hi Kalyan,

I was able to generate the .war file with "Add Jsp as compiled classes" option.

What I did, before creating the .war file I deleted the $Jsp and $web folder created earlier. Later when I created the .war file It was created sucessfully.

But I am facing problem later . After I deploy the application and run on the client I always get " Page not Found " error.

Without adding precompile Jsp my application runs perfectly but with " Jsp as compiled classes" it never run.

Has anyone faced this issue.

I want a application with .war file having precompile jsp in it as I need to run the application in a PDA.

Any ideas and suggestions ??

Thanks and Regards

Neha Mahanty

neha_mahanty
Active Participant
0 Kudos

HI All,

The problem is solved and I am able to run the application.

The reason was , When we are executing a war file with precompile jsp , the web.xml file gets chnaged and it should contain the .class file path of Jsp pages.

In my case it was still showing the jsp path instead of the .class path.

<servlet>

<servlet-name>mam_0005fstart</servlet-name>

<!-- <jsp-file>/mam_start.jsp</jsp-file>

-->

<servlet-class>mam_0005fstart</servlet-class>

</servlet>

After I chnaged the web.xml file , I was able to run the application

Regards

Neha