• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

what if I add "encodeURL" to the action ?

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic