Need some understanding of a java and jsc / jsp mixed code snippet
<p>This may look basic, but i am a C/C++ guy with some knowledge of Core Java.
I have seen a *.jsc file which has some backend java code.</p>

<p>The basic idea is, there is a browse button which uploads a WAIK (winpe.wim) file, and then it send to /srv/tftp directory after staying in the intermediate /var/tmp/Imaging/waik directory.</p>

<pre><code>The front end UI is:
&lt;web:string textKey="instructions.thirdPartyImaging" /&gt;
28    &lt;br /&gt;
29    &lt;div style="margin: 10px;"&gt;
30    
31    &lt;%-- WAIK upload --%&gt;
32    &lt;web:string textKey="settings.winPE" /&gt;
**33    &lt;table&gt;
34        &lt;tr&gt;
35            &lt;td width="80%" valign="top" nowrap&gt;
36                &lt;pbext:wimContentEditor id="objWAIK" width="100%" onFileSelect="waikFileSelected" /&gt;
37            &lt;/td&gt;
38            &lt;td&gt;
39                &lt;web:linkButton id="linkWAIK" hiddenText="&lt;%=PrebootConstants.CTYPE_WAIK%&gt;"
40                    textKey="imaging.status" onClick="showContentStatus" ajaxPost="true" /&gt;
41            &lt;/td&gt;
42        &lt;/tr&gt;
43    &lt;/table&gt;
44    &lt;br /&gt;
</code></pre>

<p>Here is the code for waikFileSelected and showContentStatus:</p>

<pre><code>public void waikFileSelected(Object sender, FileSelectEventArgs selectArgs) throws JspException
    {
        m_winPEBaseUploaded = true;
        WebLogger.debug("WAIK Base distribution uploaded sucessfully.");
    }

public void showContentStatus(Object sender, EventArgs args) throws JspException
{
    if (sender instanceof LinkButton)
    {
        String content_type = ((LinkButton)sender).getHiddenText();
        if (content_type != null &amp;&amp; ! EMPTY_STRING.equals(content_type))
        {
            cntntStatusDlg.setContentType(content_type);
            cntntStatusDlg.setVisible(true);
        }
    }
}
</code></pre>

<p>Now, this showContentStatus is a link to a button called "status" clicking which it shows whether the upload is available to the server or not.    </p>

<p>Now, i have 2 doubts:
1) How is the arguments to the function getting passed? I mean <code>waikFileSelected(Object sender, FileSelectEventArgs selectArgs)</code> has 2 arguments, but i can't see it getting passed in the XML like file.</p>

<p>2) I guess, the function <code>waikFileSelected</code> points to the browse button where the user selects the wim file to upload. But how does the control go beyond that? I mean after the file is selected, it needs to be uploaded validated etc. where there are separate functions, but i can't see them getting called. This function just sets a variable that's all !!</p>
