Solved

Struts error - "Cannot get dispatcher"

Posted on 2006-11-22
12
1,941 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

11 Experts available now in Live!

Get 1:1 Help Now