• Post Reply Bookmark Topic Watch Topic
  • New Topic

removing jsp page address in url  RSS feed

 
yarlagadda rajesh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hiiiiiiiiiiiiiiii
how to hide the jsp page names in url bar like the way in enterprise applications...........?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you need to forward the request and response object to a particular jsp on serverside
 
ujjwal soni
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using EJB ? If yes then try using below ways :::

 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB?

yarlagadda, Do you know servlet mappings in Web Deployment Descriptor(web.xml)?

you can map servlets for any file extensions (*.htm,*.jsp,*.do or plain forward slash) or you are looking for something else?
 
Kanchan Singh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
If you are using servlets and in that using RequestDispatcher reference then your *.jsp page whereever you want to redirect will not be visible to the user on browser
 
yarlagadda rajesh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi good afternoon......
thank to all giving a very good replies

you are sending a good one but my requirement is ...........

"http://localhost:8080/yahoo/addressbook.jsp"

in above having name of the jsp(addressbook.jsp)

but i want to hide the name of the jsp(addressbook.jsp) just show the url(/addressbook) pattern only
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i want to hide the name of the jsp(addressbook.jsp) just show the url(/addressbook) pattern only


Your question has answer in it.. " url(/addressbook) pattern only " And check servelt mappings as suggested by Vishal
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yarlagadda rajesh wrote:hi good afternoon......
thank to all giving a very good replies

you are sending a good one but my requirement is ...........

"http://localhost:8080/yahoo/addressbook.jsp"

in above having name of the jsp(addressbook.jsp)

but i want to hide the name of the jsp(addressbook.jsp) just show the url(/addressbook) pattern only

Did you really go through the link I have provided? Do you find any difficulties understanding it?
 
cesar valencia
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yarlagadda rajesh wrote:hi good afternoon......
thank to all giving a very good replies

you are sending a good one but my requirement is ...........

"http://localhost:8080/yahoo/addressbook.jsp"

in above having name of the jsp(addressbook.jsp)

but i want to hide the name of the jsp(addressbook.jsp) just show the url(/addressbook) pattern only


just map it in the DD

<servlet>
<servlet-name>AddressBook</servlet-name>
<jsp-file>/addressbook.jsp</jsp-file>
</servlet>

<servlet-mapping>
<servlet-name>AddressBook</servlet-name>
<url-pattern>/addressbook</url-pattern>
</servlet-mapping>

that should do it, just adjust the path of addressbook.jsp

 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cesar,

We all are here to learn and understand. We don't suggest spoon feeding. Don't give code directly.Direct the OP into correct direction and let him/her solve by own.

By the way, the code that you have provided still has some issue. Check it twice.
 
cesar valencia
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal Pandya wrote:
By the way, the code that you have provided still has some issue. Check it twice.

fixed.

sorry, i wasn't aware of such policy. I will keep it in mind next time
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cesar valencia wrote:sorry, i wasn't aware of such policy. I will keep it in mind next time

Never Mind
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!