Skip to Content
author's profile photo Former Member
Former Member

Struts access with SAP NetWeaver Web Application Server

Hi.

I'm porting an existing J2EE web app. that was designed to work with Tomcat/jBoss, and now needs to work with SAP NW WAS 6.3, and I get a problem working with Struts.

I put my JSPs inside WEB-INF folder, because I don't want them to be accessible straight through the browser.

When I run the application, Struts' "forward" action can't seem to succeed on calling the JSPs. I get a 404 error code (Not Found) with this message: "Directory web-inf is not accessible for browsing".

If I put the same JSP outside the WEB-INF folder (under webContent folder), and change the Struts' action accordingly, I get it right, but then, once again, it is accessible for the "outside world", and I can't live with that.

How should I set the security of the server to enable access to WEB-INF folder via Struts? What am I doing wrong?

Thank,

Nir Arazi

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2004 at 03:19 PM

    Hi,

    I'm afraid there is no way to configure the server to serve content under the WEB-INF directory (remember, the Servlet specification forbids that!).

    Why don't you just put your pages in a separate folder and then set a security contraint in the web.xml (using a URL pattern) to restrict access to those pages? Do you think this works in your case?

    Regards,

    Ivo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2004 at 11:50 PM

    Hi Nir

    I dont think manualy copying the files into WEB-INF folder is the right way to do this . You will have to assemble the web components into war file and then build an ear file and thgen deploy this to the Engine. Consider using Netweaver Dev Std or DeployTool.bat for this.

    Regards

    Pran

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.