aspose file tools
The moose likes Struts and the fly likes what if I add Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "what if I add "encodeURL" to the action ?" Watch "what if I add "encodeURL" to the action ?" New topic
Author

what if I add "encodeURL" to the action ?

Artemesia Lakener
Ranch Hand

Joined: Jun 21, 2005
Posts: 162
I trid this --

<html:form action="<%= response.encodeURL("/submit") %>" >

what I get is --

The browser shows me "http 500 error", but once I hit "refresh" everything works. I was confused. So I click "internet option" / "advanced", and unmark "show friendly error msg". then I found there is unhandled exception from this line, so I change it to <html:form action="/submit" >
and then the HTTP 500 error disappeared.

Now, why did it always first show 500 error first but once I hit "refresh" everything worked since then ?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I don't know why the strange behavior, but I do know that you don't need to use the encodeURL method in any Struts tags. Struts automatically does encodeURL on all links.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: what if I add "encodeURL" to the action ?
 
Similar Threads
Browser timeout problem - not session timeout
how to iterate.
two actions
Struts: Can we have a html:text tag without a html:form tag outside it.
session lost when including another file from another server