Showing posts with label Sun. Show all posts
Showing posts with label Sun. Show all posts

Aug 24, 2010

Request Header too Large

To put in the fix for this issue, you’ll have to edit the domain.xml file (for your domain) and look for the following line:

<connection-pool max-pending-count="4096" queue-size-in-bytes="4096" receive-buffer-size-in-bytes="4096" send-buffer-size-in-bytes="8192"/>


Change the figure in receive-buffer-size-inbytes, to the below :

<connection-pool max-pending-count="4096" queue-size-in-bytes="4096" receive-buffer-size-in-bytes="8192" send-buffer-size-in-bytes="8192"/>


The above line may appear many times within domain.xml, it’s okay to update all of them.

After that restart the domain and clusters and retest. The problem should go away.

Jun 17, 2010

Blank lines in Error messages

For the blank line that is appearing for your action/field messages/errors, this is how you solve it:


  • Update the “.errorMessage” element in mpa.css Change to include the following:

margin-bottom:0px;

  • Change your JSP to hold each of the <s:actionErrors/> <s:actionMessages /> <s:fieldErrors/> in separate rows of your table.

<table cellspacing=“0”>
<tr>
<td>
<s:actionErrors />
</td>
</tr>
<tr>
<td>
<s:actionMessages />
</td>
</tr>
<tr>
<td>
<s:fieldErrors />
</td>
</tr>
</table>

  • Make sure that your table also has attribute “cellspacing=’0’”.

Jun 10, 2010

Struts, Annotations and Mime

To set a dynamic filename in annotated results.

In Action class:

private String date;

//Above the action handling the download:
@Result(name = "success", type= StreamResult.class,
params = {"contentType", "application/vnd.ms-excel",
"contentDisposition", "attachment; filename=report_$(date).xls"},
value = "reportFileStream"
)

//The usual getter/setter:
public String getDate(){
return date;
}

public void setDate(String date){
this.date = date;
}