• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP doubt  RSS feed

 
agrah upadhyay
Ranch Hand
Posts: 579
  • Mark post as helpful
  • send pies
  • 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 ?
 
Shanmugam Karthikeyan
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hi,

Are you happy now ....
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hi,

Its ok, it was my mistake.........
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!