first off, i’m new to Struts and i have been following the tutorial here. I understand the set-up of files, and web.xml.
index.jsp:
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<logic:redirect forward="helloWorld"/>
However, when it comes to the opening of index.jsp, i am at quite a loss. From index.jsp, how does it call the class com.vaannila.action.HelloWorldAction? I know that index.jsp calls the forward=helloWorld but does it mean that it looks for a forward name="helloWorld", which is in <global-forwards>?
Let me know how I can further improve my question, since this is my first.
Correct; it redirects to whatever forward is named
"helloWorld".In this case, that’s a forward that runs an action that sticks a value into a form.
You’ll likely want to refer to the Struts 1 tag docs, it’ll be quicker than asking here every time.
If you can avoid learning Struts 1, I would: it’s pretty antiquated on almost all fronts. Frameworks like Struts 2 and Spring MVC dominate Java-framework-based web apps, while things like Grails, Play, Ruby on Rails, etc. dominate JVM-based web apps.
Line 17 of the config file in the tutorial you link to starts: