I want to pass two hidden fields; username and keyName from a JSP via a SUBMIT button:
<req:isUserInRole role="editor"> <html:form action="/find/Category"> <% String username = request.getRemoteUser();%> <html:hidden property="keyName" value="journal_category"/> <html:hidden property="username" value="<%=username%>"/> <html:submit>View Articles</html:submit> </html:form> </req:isUserInRole> and an action mapping: <action roles="editor" path="/find/Category" type="org.apache.struts.scaffold.ProcessAction" parameter="org.apache.artimus.article.FindEditorData" name="articleForm" scope="request" validate="false"> <forward name="success" path=".article.Result"/> </action> How come the username is not passed to the FindEditorData.java while the keyName is successfully passed. In the browser, I got: name=null; kn=journal_category; kv=null The code of my FindEditorData is shown below: public final class FindEditorData extends Bean { public Object execute() throws Exception { // Obtain username String username = getUsername(); EditorService service = new EditorService(); String value = service.findEditorData( username ); String property = getKeyName(); if (( null==property ) || ( null==value )) { StringBuffer sb = new StringBuffer(); sb.append( "name=" ); sb.append( username ); sb.append( "; kn=" ); sb.append( property ); sb.append( "; kv=" ); sb.append( value ); throw new ParameterException( sb.toString() ); } ResultList list = new ResultListBase ( Access.findByProperty( this,property,value ) ); list.setLegend( property,value ); return new ProcessResultBase( list ); } // end execute } // End FindEditorData __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]