struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesús Gallardo <>
Subject Re: Struts basic forwards
Date Thu, 14 May 2009 11:46:40 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Forgive me, you have reason.<br>
Using urls like:<br>
<a class="moz-txt-link-freetext"
<a class="moz-txt-link-freetext"
It show 2 messages the Hello and Goodbye, correctly.<br>
The problem occurs in which the index should be 2 links:<br>
         &lt;html:link action=""&gt; Hello &lt;/ html:
         Adios &lt;html:link action=""&gt; &lt;/ html:
Logically if I remove the 2 links the rest of the load index correctly.<br>
The problem is if you can not resolve the action and gives an exception.<br>
Paweł Wielgus wrote:
  <pre wrap="">Hi Jesús,
first of all without globalforwards block it should work as well.
Then try not to put anything inside those jsp files,
maybe something is wrong there.

In browser entering address like:
<a class="moz-txt-link-freetext" href="http://yourserver/yourapp/">http://yourserver/yourapp/</a>
should show hello.jsp where yourapp is application context or nothing
if it's run as a root.

You can also show more of that exception, not just first line.

Best greetings,
Paweł Wielgus.

El día 14 de mayo de 2009 12:44, Gallardo <a class="moz-txt-link-rfc2396E" href="">&lt;;</a>
  <blockquote type="cite">
    <pre wrap="">Hi for all.

Firstly thank you all for reading this email, I hope you can help me,
I'm starting with struts.

I want to do something as simple as 2 links to pass control to 2
different JPS.
as follows.

        &lt;html:link action=""&gt; Hello &lt;/ html: link&gt;
        &lt;html:link action=""&gt; Bye &lt;/ html: link&gt;

In struts-conf.xml have defined the following action-mappings and

        &lt;forward name="welcome" path="/"/&gt;
        &lt;forward name="sayhello" path="/"/&gt;
        &lt;forward name="saygoodbye" path="/"/&gt;
    &lt;/ global-forwards&gt;

        &lt;action path="/Welcome" forward="/welcomeStruts.jsp"/&gt;
        &lt;action path="/SayHello" forward="/WEB-INF/hello.jsp"/&gt;
        &lt;action path="/SayGoodBye" forward="/WEB-INF/bye.jsp"/&gt;
    &lt;/ action-mappings&gt;

And the end result is an exception type

javax.servlet.ServletException: Could not initialize class

I believed that this would work, otherwise I did not understand how
struts work.
Someone can tell me if my fault or failure of a dependency?

Tnks for all :)
GPG Public Key: <a class="moz-txt-link-freetext" href=""></a>
Key fingerprint = 8FFC 19B4 5F81 FC66 965C ACCA 01F6 2DA0 8BBA 51EC

  <pre wrap=""><!---->
To unsubscribe, e-mail: <a class="moz-txt-link-abbreviated" href=""></a>
For additional commands, e-mail: <a class="moz-txt-link-abbreviated" href=""></a>

<div class="moz-signature">-- <br>
Jesús Gallardo<br>
Jefe de Proyecto<br>
Tlf: 671 - 51 - 53 - 75<br>
<a class="moz-txt-link-freetext" href=""></a><br>
GPG Public Key: <a class="moz-txt-link-freetext" href=""></a><br>
Key fingerprint = 8FFC 19B4 5F81 FC66 965C ACCA 01F6 2DA0 8BBA 51EC<br>

View raw message