File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes doesnt display struts tags in normal html form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "doesnt display struts tags in normal html form" Watch "doesnt display struts tags in normal html form" New topic

doesnt display struts tags in normal html form

manoj samarasinghe

Joined: Nov 17, 2004
Posts: 16

earlier i used normal html forms. eg...<form name="customize" method="post" onsubmit="checkSubmit()">

then when i insert any struts <html:...> tags (for example <html:text> in to that form it dosnt display.or error is given.

but if i change the normal form in to struts form the problom solved.
it displays without problom.
but whan i use struts forms i can use only one action for a form.

but still i need a way to use normal html forms.
beause then i can only use more than one action in a form.

i need a way to handle multiple actions within a one form (normal html form)and use struts tags .not struts forms.

help me...

if you use normal form instead of struts forms u can see that...
<%@ page language="java" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
background-image: url(Nback.jpg);
#list {height: 380px; width: 900px; overflow: auto}
<link href="ARS.css" rel="stylesheet" type="text/css">
<style type="text/css">
.style2 {font-size: 18px}

<body >
java.util.Date date = new java.util.Date();

<span class="ARS style2">
<div align="center">
<span class="ARS style2">New CV's</span></span><table width="1000" border="0" cellpadding="0" cellspacing="0">
<td width="867" height="63"> </td>
<td colspan="2" valign="top"><div id="Layer1" class="ARS" style="position:absolute; left:761px; top:12px; width:237px; height:79px; z-index:1">
<p>Login As: [Cordinator]</p>
<p align="right">[
<html:link page="/">Home</html:link>
] [
<html:link page="">LogOff</html:link>
] </p>
</div> <p> </p>
<p> </p></td>
<td width="7"></td>
<td height="44"></td>
<td width="13"></td>
<td width="113"></td>
<td height="582" colspan="2" valign="top">

<html:form action=""> <!--change to ...<form name=..... to see the problom -->

<p class="ARS">
<label> Select Candidates By,
<html:radio property="optDateOrName" value="Date"/>
<html:radio property="optDateOrName" value="Name"/>
<html:radio property="optDateOrName" value="All"/>
<html:text property="txtSearch" size="20"/><font color="#FF0000"><html:errors/></font>
<html:submit property="btnSend" ><bean:message key=""/></html:submit>
<div ID="list">
<table width="823" border="1">
<tr bgcolor="#CCCCCC" class="ARS">
<th width="72" height="42" valign="top" scope="col">Candidate name </th>
<th width="99" valign="top" scope="col">Date Posted </th>
<th width="73" valign="top" scope="col">Select Track </th>
<th width="127" valign="top" scope="col">Select Short Lister </th>
<th width="102" valign="top" scope="col">Return Date </th>

<html:form action="">
<logic:iterate id="cvs" name="newCvPageForm" property="newCV" indexId="indexID">
<tr class="ARS">
<td height="35" valign="top"><a href="Cvtest.doc">
<html:checkbox property="chkNewCv"/><bean:write name="cvs" property="candidateName"/>
</a><bean:write name="indexID"/>
<td valign="top"><bean:write name="cvs" property="datePosted"/></td>
<td valign="top"><html:select indexed="true" name="newCvPageForm" property="selTrack">
<html ption value="a">
TR-1</html ption>
<html ption value="b">
TR-2</html ption>
<html ption value="c">
TR-3</html ption>
<td valign="top"><html:select indexed="true" name="newCvPageForm" property="selShortList">
<html ption value="a">SL-1</html ption>
<html ption value="b">SL-2</html ption>
<html ption value="c">SL-3</html ption>
<td valign="top"><html:text indexed="true" property="txtReturnDate"/></td>

<html:submit property="btnSend"><bean:message key="button.sendtosl"/></html:submit>
<html:submit property="btnSend" ><bean:message key="button.sendtohold"/></html:submit>

Nathan Pruett

Joined: Oct 18, 2000
Posts: 4121

Moving to the Web Application Frameworks forum, since question is about Struts.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

Both forms point to the same ActionMapping, so why not use just one form?

A good workman is known by his tools.
I agree. Here's the link:
subject: doesnt display struts tags in normal html form
It's not a secret anymore!