Boa tarde a todos…
Sou iniciante em jsp e estou com um problema que não sei exatamente o que é, bom o dilema acontece quando o jsp, busca os dados do banco e popula uma tabela, se o valor do campo é uma string qualquer vem normal, mas se o usuário colocar por exemplo isso na string = “hdev\bla”, o campo sai do java normal, mas quando aparece no jsp na tela fica como “hdev/bla”, pois é, não faço nem idéia o que é isso…
Abaixo o jsp:
<%@ page import="com.adp.decs.model.entity.Application;"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="/struts-dojo-tags" prefix="sx"%>
<%@ taglib prefix="decs" uri="decs-tags" %>
<s:form name="findForm" id="findForm" method="post">
<s:include value="/jsp/findFilter.jsp" />
<s:component templateDir="template" theme="adp" template="pageTitle">
<s:param name="title" value="'Search Application'" />
</s:component>
<table width="100%" border="0" cellspacing="0" cellpadding="4" bordercolor="#BFBFBF" bgcolor="#BFBFBF">
<tr>
<td width="100px">
<s:label value="Application/Alias"/>
</td>
<td>
<sx:autocompleter id="optionsApplication" name="findFilter.application.name" maxlength="200"
autoComplete="true" preload="false" cssClass="autocompleterWidth200"
loadOnTextChange="false" iconPath="/images/default_down_arrow.gif" resultsLimit="-1"
list="applicationNamesAndAliases" listKey="value" listValue="value" keyName="name"/>
</td>
</tr>
<tr>
<td>
<s:submit value="Find" action="Application_list" align="left" onclick="prepareFind();" appFuncName="Search Application" />
</td>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td width="50%">
<s:component templateDir="template" theme="adp" template="pagination">
<s:param name="totalRecordCount" value="paginatedValueList.totalCount" />
<s:param name="rowsPerPage" value="findFilter.rowsPerPage"/>
<s:param name="startRow" value="findFilter.startRow"/>
</s:component>
</td>
<td>
<s:label value="Rows Per Page"></s:label>
<s:select label="Rows Per Page" name="findFilter.rowsPerPage" id="findFilter.rowsPerPage" onchange="$('findFilter.startRow').value = 0;" list="findFilter.rowsPerPageList" />
</td>
<td align="right">
<s:submit value="Add New" action="Application_addNew" appFuncName="Add Application" />
</td>
</tr>
</table>
<s:actionmessage cssClass="ADPUI-messageConfirm" cssStyle="width='100%'" />
<s:actionerror cssClass="ADPUI-messageError" cssStyle="width='100%'" />
<div id="dynamicDiv" style="width: 100%; height: 350; overflow: auto;">
<table id="dynamicTable" cellspacing="1" class="ADPUI-table" cellspacing="1" cellpadding="1" style="max-height: 350">
<thead>
<tr>
<th width="30%" id="th_name" onclick="javascript:submitOrder(this);" class="sortable">
<s:a href="#">Application</s:a>
</th>
<th width="15%" id="th_alias" class="sortable">
<s:a href="#">Alias</s:a>
</th>
<th width="15%" id="th_version" class="sortable" >
<s:a href="#">Version</s:a>
</th>
<th width="20%" id="th_<%= Application.SORT_BY_CREATION_DATE %>" onclick="javascript:submitOrder(this);" class="sortable">
<s:a href="#">Creation Date</s:a>
</th>
<th width="15%" id="th_createdBy" onclick="javascript:submitOrder(this);" class="sortable">
<s:a href="#">Created By</s:a>
</th>
</tr>
</thead>
<tbody>
<s:iterator value="paginatedValueList.result" var="app" status="itStatus">
<decs:security>
<decs:ifHas appFuncName="Edit Application">
<s:url id="editUrl" action="Application_edit">
<s:param name="id" value="%{#app.id}" />
</s:url>
</decs:ifHas>
<decs:elseHas>
<s:set name="editUrl" value="" />
</decs:elseHas>
</decs:security>
<tr class="<s:if test="#itStatus.odd == true ">odd</s:if><s:else>even</s:else>"
ondblclick="editAction('<s:property value="%{#editUrl}" />')"
onclick="highlightRow(this)">
<td>
<s:property value="%{#app.name}" escape="html" escapeJavaScript="true" />
</td>
<td>
<s:iterator value="%{#app.applicationAliases}" var="alias" status="itStatusAppVer">
<s:property value="%{#alias.name}" escape="html" escapeJavaScript="true" /><br/>
</s:iterator>
</td>
<td>
<s:iterator value="%{#app.applicationVersions}" var="appVersion" status="itStatusAppVer">
<s:property value="%{#appVersion.name}" escape="html" escapeJavaScript="true" /><br/>
</s:iterator>
</td>
<td>
<s:date name="%{#app.creationDate}" format="%{getText('default.date.format')}" />
</td>
<td>
<s:property value="%{#app.createdBy}" escape="html" escapeJavaScript="true" />
</td>
</tr>
</s:iterator>
</tbody>
</table>
</div>
</s:form>
Agradeço por qualquer ajuda…