Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get filename to browser

 
aatish pandya
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having my code written in NewServlet.java. How can I print the filename "NewServlet" to browser?
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome To JavaRanch

why not try to set the request or context parameters,
Set the name of file in it.
And get those parameter in your JSP
 
aatish pandya
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Shanky,

I want the name from the System like we can get date and time from the sys!
Suppose I made a Servlet "MyServlet". Now I have getName.Jsp file where I could pass the name of MyServlet and getName.jsp will just print "MyServlet" on the web browser! any help?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic