• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

404 name of the project in url is missing after I redirect

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys, I have an application where I type url for example : http://MyWebProject it goes to index.jsp. That's fine.
In this specific jsp I have :
response.sendRedirect("store1/logon.do");

I can have many stores.

After redirect the url is :

https://store1/logon.do

What happened with "MyWebProject" within url ??

It was supposed to be :
http://MyWebProject/store1/logon.do


Thank you for your attention!

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.

Leo Noyer wrote:
In this specific jsp I have :



Putting code in a JSP has been a Bad Idea since, well, forever. If you are using Struts, all your page display decisions should be in Action classes and the Struts config file.

Leo Noyer wrote:
response.sendRedirect("store1/logon.do");
After redirect the url is :
https://store1/logon.do



The Servlet API documentation sure makes it sound like it should do what you want. I don't think you have given us enough information to diagnose your issue. See here for some hints on how to help us help you.
 
Leo Noyer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Joe, thank you for "welcome".

I just started a new job and code is already there. I didn't like the way how the other developer did it, anyways.

I can get the login page, but after that it seems the path is ignore my web project name in the url. Is there any place where I can set any like starts with : https://MyProjectWeb/XXX.

The link for example : Help

Mouse over I should see : https://MyProjectWeb/XXX/help.do

BUT, I am only seeing : https://XXX/help.do

Thank you!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic