Solved

Struts error - "Cannot get dispatcher"

Posted on 2006-11-22
12
1,965 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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
 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with LDAp login using jsp 6 116
Lamba in java 8 9 248
servlet init param and contect param 3 66
dynamic reloading of jsp in jetty 2 121
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 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