Solved

How do I get the name of the JSP being called?

Posted on 2002-07-11
1
150 Views
Last Modified: 2010-04-01
Hello,

When a jsp is called I want it to get it's own name. So, if a user calls page testPage.jsp, I want testPage.jsp to be able to determine it's own name (testPage.jsp)....
 How?

THanks
Keith

0
Comment
Question by:keithedward
1 Comment
 
LVL 27

Accepted Solution

by:
rrz earned 50 total points
ID: 7147036
use this for the complete path.
application.getRealPath(request.getServletPath());
use  
request.getServletPath();  
to get
yourJSPdirectory/testPage.jsp
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

15 Experts available now in Live!

Get 1:1 Help Now