cancel
Showing results for 
Search instead for 
Did you mean: 

NWDS generated JSP not found

Former Member
0 Kudos

I am using NWDS 7.0.09 with the included NetWeaver Application Server

I have created a project with a folder structure of webcontent/html

In here I have put html files and jsp files.

I also created a jsp using the NWDS wizard for a simple test.

When I try to run this, I get an error:

The requested resource test.jsp is not available ....not found in application root of alias of J2EE application. However if I change the URL to the html page, it finds those in the same directory.

I have also checked the application alias and it seems setup correctly.

Any suggestions?

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Allen,

Welcome to the SDN forums!

JSP files should be placed in the <i>webContent</i> folder of the Web Porject - see thread.

Hope it helps!

-Vladimir

Former Member
0 Kudos

Vladimir - thanks

I will try removing the / and see how it goes.

Can I put jsp's in a subfolder in webcontent (ie - webContent/html) or does it need to be in the root?

thanks again

Vlado
Advisor
Advisor
0 Kudos

Hi Allen,

Indeed, JSP files can be in any subfolder of webContent (except WEB-INF and META-INF). So, your scenario should also work out.

Probably the problem in this case is that the JSP has not been compiled successfully. Please request it and check the response. If my assumption is correct, it should contain some exception with an ID. Then go to the server trace file (/usr/sap/<SID>/<instance>/j2ee/cluster/server<N>/log/defaultTrace.trc) and search for that ID. It will tell you the actual reason for the error.

HTH!

-Vladimir

PS: Please forget my note about removing the leading slash in the web.xml <jsp-file> elements. It must be exactly how you did it (<b>with</b> the slash).

Former Member
0 Kudos

Guys - thanks much I isolated the error, its solved.

Vladimir - thanks for mentioning the log file is .trc and reference to the other links

Shilpa - thanks for the original posts

New users - find the errors in the trc log and search in the forum and give points good luck !!

- Allen

Vlado
Advisor
Advisor
0 Kudos

Allen - thanks for your feedback! And good luck to you too

-Vladimir

Answers (1)

Answers (1)

former_member187702
Active Participant
0 Kudos

Hi Allen

Are the jsp files referred in the web-xml like this

<servlet>

<servlet-name>New.jsp</servlet-name>

<jsp-file>/New.jsp</jsp-file>

</servlet>

Former Member
0 Kudos

Shilpa - thanks

its "kind of" like that

Here is the xml snippit:

<web-app>

<display-name>WEB APP</display-name>

<description>WEB APP description</description>

<servlet>

<servlet-name>energizedState.jsp</servlet-name>

<jsp-file>/html/energizedState.jsp</jsp-file>

</servlet>

</web-app>

That is what I expect I think - because in my webcontent folder I have a subfolder html that contains the html pages and the jsp pages. Does that make sense?

Can I put jsp's in a subfolder under the webcontent or must it stay in the root?

Any ideas? Thanks again