• Post Reply Bookmark Topic Watch Topic
  • New Topic

forward/sendRedirect file name changes automatically  RSS feed

 
Sandeep. Oza
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a very typical problem in my java jsp application runs on solaris box with Tomcat 4.1.18 server.
In my jsp page i have written response.sendRedirect("taskListPage.jsp");
Tomcat shows error... file /jsp/tasklistpage.jsp not found.
Note: i have given L and P uppercase in my code.. but tomcat finds lowercase. And I am sure .. any nowhere i have mention lowercase file name... Then why it forward to lowercase file name..??? naturally that file does not exist.
Pl. help...
Thanks in advance.
Sandeep Oza
 
Sainudheen Mydeen
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Can you rename your file and try.
-------------
Sainudheen
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sendRedirect() method is used to send a message to the client's browser in order to redirect it to other URL... So if you want to redirect it to the "taskListPage.jsp", you have to specify the full adress sthing like "www.yourDomain.com/yourWebApp/../taskListPage.jsp"...
Hope this helps...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66157
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you have to specify the full adress sthing like "www.yourDomain.com/yourWebApp/../taskListPage.jsp"...

That is incorrect. You can specify a relative URI which the container will resolve as relative to the URI of the current request.
To the original question:
I'm not sure where along the way the case of your file path is getting munged, but given that various systems you might be dealing with handle case differently (Windows being case-insensitive, unix variants like Linux and OS X being case-sensitive) it might make sense to restrict your JSP names to all lowercase as a precaution.
hth,
bear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!