Hi Mike,

Sorry for the delay in getting back to you - do you still have an issue with
this?

OK, personally - I've never seen this exact error before and I've not been
successful in attempting to reproduce: "Exception forwarding for name
welcome:" and attempts to reproduce this error were not successful!

The error seems to come from:

...
at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
...

i.e. index.jsp

When I reproduced your actions and forwards, I used an index.jsp, as
follows:

        <%@page contentType="text/html"%>
        <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
        <html:link forward="adminMenu">Administrative Functions</html:link>

... and this worked fine.

>> I've been trying different things and now I'm getting it on welcome ...
it's
going from bad to worse. <<

OK - what's your current state of play - i.e. would it helped if I sent you
the play app (as a .war) I was using to test the code you posted - as it
does seem to work for me?

H.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:mike.witt@;honeywell.com]
Sent: 08 November 2002 20:20
To: [EMAIL PROTECTED]
Subject: RE: html:link question


Hi Hue,

You're a glutton for punishment, but here is the whole thing:

org.apache.jasper.JasperException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named admin
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
48)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:484)


root cause

javax.servlet.ServletException: Exception forwarding for name welcome:
org.apache.jasper.JasperException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named admin
        at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:494)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:60)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
04)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:484)

I've been trying different things and now I'm getting it on welcome ... it's
going from bad to worse.

Thanks, Mike

-----Original Message-----
From: Hue Holleran [mailto:hueh@;softwareskills.net]
Sent: Friday, November 08, 2002 2:58 PM
To: 'Struts Users Mailing List'
Subject: RE: html:link question


Hi Mike,

What is the full error message that the referred to by the error (i.e. does
it give a hint which component it was attempting to execute when this error
occurred?):

        jasper.JasperException: Cannot create rewrite URL:
        java.net.MalformedURLException: Cannot retrive ActionForward named
/admin

e.g. you may get a line a few lines down such as:

        ...
        at org.apache.jsp.index$jsp._jspService(index$jsp.java:87)
        ...

That would indicate this occurred whilst executing index.jsp. I would guess
this is indicating a runtime error - does it report the component, e.g. JSP
it is attempting to execute when it reports this error. I get some
interesting behaviour with NetBeans on Windows 2000 when changing the case
of a JSP file, e.g. MyPage.jsp -> myPage.jsp which compiles the JSP to a
servlet but then can't find the servlet.

What I would recommend you do is to look for the file named above on the
disk and (with .java or .class extension) and delete any that are not the
original copy of the file, e.g. .jsp

Best of luck,

Hue.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:mike.witt@;honeywell.com]
Sent: 08 November 2002 19:00
To: [EMAIL PROTECTED]
Subject: RE: html:link question


I didn't notice that the entire message is:

jasper.JasperException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named /admin

My forward is called adminMenu, I renamed it from "admin" a while ago.  Now,
when I look, I don't see the "admin" by itself anywhere.  I'm using
Tomcat.4.12.  I removed the work directories and restarted Tomcat but
without success.  Here is my entire struts config ... notice that the
datasource references are commented out right now.

Thanks for your help.

Mike
----------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

<!--
     This is the Struts configuration file for the example application,
     using the proposed new syntax.

     NOTE:  You would only flesh out the details in the "form-bean"
     declarations if you had a generator tool that used them to create
     the corresponding Java classes for you.  Otherwise, you would
     need only the "form-bean" element itself, with the corresponding
     "name" and "type" attributes.
-->


<struts-config>


  <!-- ========== Data Source Configuration ===============================
-->
  <data-sources>
 <!--   <data-source>
      <set-property property="maxCount"
                       value="4"/>
      <set-property property="minCount"
                       value="2"/>
      <set-property property="description"
                       value="Artimus:MySQL Data Source Configuration"/>
      <set-property property="driverClass"
                       value="org.gjt.mm.mysql.Driver"/>
      <set-property property="url"
                       value="jdbc:mysql://localhost:3306/artimus"/>
      <set-property property="autoCommit"
                       value="true"/>
      <set-property property="user"
                       value="root"/>
      <set-property property="password"
                       value=""/>
    </data-source>  -->
  </data-sources>

  <!-- ========== Form Bean Definitions ===================================
-->
  <form-beans>

  </form-beans>


  <!-- ========== Global Forward Definitions ==============================
-->
  <global-forwards>
    <forward   name="welcome"              path="/welcome.do"/>
    <forward   name="adminMenu"            path="/adminMenu.do" />
  </global-forwards>


  <!-- ========== Action Mapping Definitions ==============================
-->
  <action-mappings>

    <action path="/welcome"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/welcome.jsp"/>

    <action path="/adminMenu"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/admin-menu.jsp"/>

  </action-mappings>


  <!-- ========== Controller Configuration ================================
-->

  <controller>
    <!-- The "input" parameter on "action" elements is the name of a
         local or global "forward" rather than a subapp-relative path -->
    <set-property property="inputForward" value="true"/>
  </controller>


  <!-- ========== Message Resources Definitions ===========================
-->

  <message-resources
    parameter="org.apache.struts.webapp.example.ApplicationResources"/>



</struts-config>

-----Original Message-----
From: Hue Holleran [mailto:hueh@;softwareskills.net]
Sent: Friday, November 08, 2002 10:41 AM
To: 'Struts Users Mailing List'
Subject: RE: html:link question


As you say "welcome" works fine, your syntax looks fine. However the error
message is a bit strange and doesn't correspond to the name of the forward
or of the action!  All I can really think of - we find ourselves in this
situation a lot by the way and it's always our fault if that's any
consolation at all - is to look for possibly a duplicate definition of
adminMenu action/a forward that may be causing the problem or that it's
actually getting to /WEB-INF/pages/admin-menu.jsp and something there is
giving the error you describe.

BTW I pasted your code into our sample - we seem to use it a lot ourselves!
. and it worked OK, i.e. for the page with a link for "Adm. Funcs." and on
clicking link got a 404: The requested resource
(/WEB-INF/pages/admin-menu.jsp) is not available, as to be expected.

Maybe try posting your complete struts-config.xml?

Sorry can't help,

Hue.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:mike.witt@;honeywell.com]
Sent: 08 November 2002 13:49
To: [EMAIL PROTECTED]
Subject: html:link question


Hello,

I'm having a problem with html:link which gives me the Cannot "retrive
ActionForward named /admin" message.  My struts config has:

  <global-forwards>
    <forward   name="welcome"              path="/welcome.do"/>
    <forward   name="adminMenu"            path="/adminMenu.do" />
  </global-forwards>


  <action-mappings>
    <action path="/welcome"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/welcome.jsp"/>

    <action path="/adminMenu"
        type="org.apache.struts.actions.ForwardAction"
        parameter="/WEB-INF/pages/admin-menu.jsp"/>
  </action-mappings>

My jsp has:

<html:link forward="adminMenu">Administrative Functions</html:link>

This gives me the error message.  However, if I replace "adminMenu" with
"welcome" it works just fine.  Also, if I use the page attribute it works
for welcome.do and not for adminMenu.do.  Any help is appreciated!

Mike

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@;jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to