I think your getting confused because when you set up a path to an Action,
it's a virtual path, but when it's a forward, it's a physical path, in
BOTH cases it's relative to the root of your webapp.

For instance... You may have an Action that you map to the path
"/my/action/is/the/best/Action.act"  So that string is literally the
target of your form.  Your physical directory structure however probably
doesn't have any of those directories.  That's OK, if this is in an
<action> tag in struts-config.xml, the resource will be found because the
incoming URI can be mapped to that Action's path attribute.

When you write the path for a forward however, you are referencing a
physical resource (well, usually anyway, assuming it's a JSP).  In that
case, the path you see WILL be a real path, like
"/myProject/jsp/myJSP.jsp" in your case.  The exception is if you forward
to another Action (which you of course can do), then the path will be
"virtual" as before.

On your second point about window sizes, I'm 99% sure there's nothing in
Struts specifically that will help you.  You'll have to open the window
via Javascript and set it's size there.  Just load your popup.jsp into it
and you should be all set.

Hope this helped!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Sat, September 18, 2004 5:07 am, Ryan julius said:
>
> Hi,
>
> I am trying to master, Struts.
>
> I am creating a struts application with the following settings, and I am
> getting confused with the concept of the struts action "path".
>
> Directory tree:
>
> ==========
>
> c:\project\adminProject => the root of my project called adminProject
>
> c:\project\adminProject\jsp => for jsp pages
>
> c:\project\adminProject/src/org/mycomp/user/action/AdminUserAction.java
>
> CreateUser.jsp:
>
> =============
>
> <html:form name="adminUserForm" action="/web/jsp/user/AdminUser"
> type="org.mycomp.user.form.AdminUserForm" >
>
> struts-config.xml:
>
> =============
>
> <form-bean name="adminUserForm" type="org.mycomp.user.form.AdminUserForm"
> />
>
> <action name="adminUserForm" path="/web/jsp/user/AdminUser"
> type="org.mycomp.user.action.AdminUserAction" parameter="dispatch"
> validate="true" scope="session" input="/web/jsp/user/AdminUser.jsp">
>
> <forward name="success" path="/web/jsp/user/PopupMenu.jsp" />
>
> </action>
>
> Questions:
>
> 1.) I have been explained that the "path is a context-relative path of the
> submitted request starting with / character and omitting any file name
> extension if extension mapping is being used." (ref. Chuck C. book, and
> ...)
>
> This definition is abstract for me. What is the path of a request? And
> mainly, which context is concerned here? Is it the container context or
> the application context?
>
> a.) How do you setup that context?
>
> b.)How do struts resolves the path within its flow of execution?
>
> c.)What are the rules of setting the path in order to avoid errors like
> "resource (/web/jsp/user/AdminUser) not found!"?
>
> d.)Is there any advantage of setting : path="/web/jsp/user/AdminUser"
> instead of path="/AdminUser"?
>
> ================
>
> 2.) I would like the PopupMenu.jsp being a page into a window of a given
> size let say width=300 and height=200. At the moment, the content of my
> PopupMenu.jsp is displayed into a large window. I would like to
> dynamically set the size of this window.
>
> Thanks for your reply.
>
>
>
> ---------------------------------
> Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
> Créez votre Yahoo! Mail
>
> Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés
> pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to