Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > having problem with RequestDispatcher

Thread Tools

having problem with RequestDispatcher

Posts: n/a
hi all.
i am currently working with java-based blogging engine.
it's presentation layer is based on struts framework.

to make urls look tidy (
i've been trying to use RequestDispatcher object to forward the
incoming tidy url to our blog engine's native url (such as

but it does not work at all.
system yields the log below.

- Invalid path /blog/entry/view was requested

i don't have any idea.
could anybody help me out?

joshua song.

Reply With Quote
Posts: n/a
sorry i forgot something.
i used this two lines of simple code:

RequestDispatcher rq = request.getRequestDispatcher("/blog/entry/");
rq.forward(request, response);

Reply With Quote
Posts: n/a
Joshua wrote:
> sorry i forgot something.
> i used this two lines of simple code:
> RequestDispatcher rq = request.getRequestDispatcher("/blog/entry/
> rq.forward(request, response);

When you get the RD from request it cannot step outside the current context
root. You have to get the ServletContext of the other context root, then call
ServletContext.getRequestDispatcher(java.lang.Stri ng) on it.

- Lew
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[J2EE] RequestDispatcher.include problem John English Java 6 07-19-2005 07:54 AM
RequestDispatcher executing in wrong directory DiscoStu Java 1 07-20-2004 12:47 PM
RequestDispatcher.include() behavior Ryan Stewart Java 0 05-20-2004 03:57 AM
RequestDispatcher.forward() Taking 30 Seconds Each Will Handley Java 1 12-10-2003 11:52 AM
Multiple includes with RequestDispatcher Paul Vincent Craven Java 0 08-29-2003 03:53 PM