This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes redirecting to a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "redirecting to a servlet" Watch "redirecting to a servlet" New topic

redirecting to a servlet

aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
hey all,

I have a website that I made it call a servlet getDataServlet as soon as it is started by making "welcome.html" the home page of the website as a URL pattern for the servlet.
this getdataServlet gets the data and dispatches to a jsp that displays it.
now from another servlet, I changed some data and I want to call again the getDataServlet to display the new and modified data.
How can I do that ?
I did response.sendRedirect("/welcome.html"); it doesnt work, Idont see any thing (blank page) eventhough the url is correct.

please help me.
ak pillai
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
Why not forward or sendRediredirect to your getRequestServlet resource URL.

java j2ee job interview questions with answers | Learn the core concepts and the key areas
aymane chetibi
Ranch Hand

Joined: Apr 12, 2006
Posts: 175
Iam sorry but I did not get what u mean
can u illustrate with some examples ??

thanks alot
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63195

Originally posted by aymane chetibi:
Iam sorry but I did not get what u mean
can u illustrate with some examples ??

aymane chetibi, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: redirecting to a servlet
It's not a secret anymore!