Solved

Struts error - "Cannot get dispatcher"

Posted on 2006-11-22
12
1,949 Views
Last Modified: 2012-08-13

Hi all,

Im getting this error when I try and load a page :

2006-11-22 09:13:23 - Ctx(/wmk) : Status code:500 request:R( /HOME + /MYPAGE.do + null) msg:Cannot get request dispatcher for path addNewValue


Here is my corresponding struts-config.xml entry:

    <action path="/myAction"
            type="com.addNewValue"
            name="addValueForm"
            scope="request"
            validate="false"
            >                       
      <forward name="addValue" path="gdAddNewSimpleValue" />
    </action>


Thanks for any help
0
Comment
Question by:monitorscreen
  • 6
  • 6
12 Comments
 
LVL 5

Accepted Solution

by:
deeppra earned 195 total points
ID: 17994449
change like this
<forward name="addValue" path="/gdAddNewSimpleValue" />
0
 

Author Comment

by:monitorscreen
ID: 17994592

Ya i did that and its working now. none of my other paths need the / . Why is it so in this case?
0
 

Author Comment

by:monitorscreen
ID: 17994665

its not actually working, I can put in any value into the path as long as a slash is the prefix and the correspond .do file page is displayed.

Any ideas?

THANKS
0
 
LVL 5

Expert Comment

by:deeppra
ID: 17994689
explain clearly
0
 

Author Comment

by:monitorscreen
ID: 17994707

ok, apologies if I was vague.


When I use this :
<forward name="addValue" path="/gdAddNewSimpleValue" />
The .do page is gettign loaded but the contents of the jsp (which is just some text) is not being displayed.


I can have any value in the path like :
  <forward name="addValue" path="/thisJspDoesNotExist" />

and /myAction.do will still get loaded.

thanks again

0
 
LVL 5

Expert Comment

by:deeppra
ID: 17994762
the path attribute is used to locate a particular HTML,JSP or Action
so it should end with HTML or JSP or .do
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:monitorscreen
ID: 17994785

Ive tried:
<forward name="addValue" path="/myPage.jsp" />

But im getting this error:
2006-11-22 11:57:48 - Ctx(/dld) : Status code:404 request:R( /wmk + /myPage.jsp + null) msg:null
0
 
LVL 5

Expert Comment

by:deeppra
ID: 17994814
404 means u dont have that mypage.jsp file in the current directory...check where u have that file in the current directory
0
 

Author Comment

by:monitorscreen
ID: 17994861


Yes the file is there alright. Sorry but I previously did not post the full error which is:

2006-11-22 12:10:00 - Ctx(/wmk) : Class not found: TOMCAT/JSP/myPage.jsp
2006-11-22 11:57:48 - Ctx(/dld) : Status code:404 request:R( /wmk + /myPage.jsp + null) msg:null

I checked and the class file is not being created.
What could be wrong?
0
 
LVL 5

Expert Comment

by:deeppra
ID: 17994872
directly from the explore open that JSP file and see whether its comming or not
0
 

Author Comment

by:monitorscreen
ID: 17995380

No its not comming??
0
 
LVL 5

Expert Comment

by:deeppra
ID: 17995390
i think this should be started in a new thread so that experts can see this question and answer to this
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Often, people trade privacy and security for convenience. However in today's concrete jungle, this is an extremely foolish decision considering the vast amount of technologies being used against consumer interest. First off, I won't waste any time e…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now