Solved

resource not found

Posted on 2014-07-22
4
179 Views
Last Modified: 2014-07-27
I  have  set  in the code

sb.append("/jsp/tiles/showError.jsp");

Open in new window


, Here is the snapshot of the url path, what might be the reasonsnapshottype Status report

it shows me  the error, what might be the reason...



description The requested resource (/tiles/showError.jsp) is not available.
type Status report

message /tiles/showError.jsp

description The requested resource (/tiles/showError.jsp) is not available.
0
Comment
Question by:roy_sanu
  • 2
  • 2
4 Comments
 
LVL 35

Accepted Solution

by:
girionis earned 250 total points
ID: 40213699
You should move your JSP files outside the WEB-INF folder, directly under the root folder of your application. So if you application is called "myapplication" then WEB-INF and jsp should be on the same level, therefore you should have

myapplication
     jsp/tiles/showError.jsp
    ...
    WEB-INF/....
0
 

Author Comment

by:roy_sanu
ID: 40213776
you are right, but we want to set through tiles as tiles folder has a header and footer, how to set the tiles. In the tiles we have something like this, but how i have to set the showerror.jsp inside it.  it will be appreciable
the tiles files has

<tiles-definitions>

      <definition name="base.definition" template="/WEB-INF/jsp/tiles/main.jsp">
            <put-attribute name="header" value="/WEB-INF/jsp/tiles/header.jsp" />
            <put-attribute name="menuBar" value="/WEB-INF/jsp/tiles/menuBar.jsp" />
            <put-attribute name="body" value="/WEB-INF/jsp/tiles/defaultContent.jsp" />
            <put-attribute name="footer" value="/WEB-INF/jsp/tiles/footer.jsp" />
      </definition>
0
 
LVL 35

Expert Comment

by:girionis
ID: 40213843
I'd say you move all the tiles files outside WEB-INF and change the tiles definition to

<tiles-definitions>

      <definition name="base.definition" template="/jsp/tiles/main.jsp">
            <put-attribute name="header" value="/jsp/tiles/header.jsp" />
            <put-attribute name="menuBar" value="/jsp/tiles/menuBar.jsp" />
            <put-attribute name="body" value="/jsp/tiles/defaultContent.jsp" />
            <put-attribute name="footer" value="/jsp/tiles/footer.jsp" />
      </definition> 

Open in new window

0
 

Author Closing Comment

by:roy_sanu
ID: 40223524
Any way you are right, thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now