• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP doubt

 
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For a JSP file,
<servlet>
<servlet-name>ABC</servlet-name>
<jsp-file>/Test.jsp</jsp-file>
</servlet>
Im want ot ask what i will have to give in <jsp-file>if it is inside
webapproot/WEB-INF/classes ?
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

______________________________________________________________________
Im want ot ask what i will have to give in <jsp-file>if it is inside
webapproot/WEB-INF/classes ?
______________________________________________________________________

If you want to access your JSP file, then you should not place that jsp file inside WEB-INF/classes folder.According to the Specification the container should not allow direct access of any files placed under the
WEB-INF folder.

If iam right the tag which you have specified serves for no purpose.we use the <jsp-file> tag inside the <servlet> tag mainly for setting servlet init parameters which is not present in your tag declaration.

Pls place the jsp file under your web-root or in a folder inside your web-root.
 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But it can be put there for request dispatching.
 
Shanmugam Karthikeyan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Though it is perfectly valid to put a JSP file inside the WEB-INF to prevent direct access to clients, in which case, it is only accessible via forwards/includes

The problem is that the jsp inside WEB-INF folder cannot access resources like images,scripts etc.The specification doesn't suggest anything in this regard, it is upto the web-server whether to consider the jsp or not.

As you had stated, can you let me know how you can access a jsp inside the WEB-INF folder using the RequestDispatcher.


regards

S.Karthikeyan
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(you should have a look at the Naming Policy of this forum)
[ December 15, 2005: Message edited by: Satou kurinosuke ]
 
Shanmugam Karthikeyan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Are you happy now ....
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thx, I am indeed
(sry about this, but this seem to be wasting time to the bartenders to always remind people this kind of things)
 
Shanmugam Karthikeyan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Its ok, it was my mistake.........
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Satou kurinosuke:
Thx, I am indeed
(sry about this, but this seem to be wasting time to the bartenders to always remind people this kind of things)



The bartenders appreciate your help.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic