This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
  • Carey Brown
  • salvin francis
  • Claude Moore

Error after resetting password  RSS feed

Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,

I have an error after resetting my password, and is as follows:

1. In the login page, I ask to reset my password, fill in the information and I receive the email.
2. In the email, I click the URL and the browser opens in the correct page.
3. I submit the new password, I get the message that it updated successfully and I click on the link to go to the login page.
4. In the login page, I insert my login and the new password, submit the information, and I get the following error:

(URL http://localhost:8080/jforum/

HTTP Status 404 -


type Status report


description The requested resource () is not available.

The information is, in fact, submitted, because if I go directly to the forum's homepage, I can see that I'm logged in.

I noticed that the HTML for the login page contains (after the recover password process)
<input type="hidden" name="returnPath" value="http://localhost:8080/jforum/" />

whereas the "simple" login page contains
<input type="hidden" name="returnPath" value="http://localhost:8080/jforum/forums/" />

So, why do I get the error? Is it some misspelled URL redirection after processing

I'm running JForum 2.1.8 in the following environment:

"Using CATALINA_BASE: /root/tomcat
Using CATALINA_HOME: /root/tomcat
Using CATALINA_TMPDIR: /root/tomcat/temp
Using JRE_HOME: /etc/java6
Server version: Apache Tomcat/6.0.16
Server built: Jan 28 2008 11:35:29
Server number:
OS Name: Linux
OS Version: 2.6.9-42.ELsmp
Architecture: i386
JVM Version: 1.6.0_05-b13
JVM Vendor: Sun Microsystems Inc."

Thank you for support,
Alexandre Ramos
[originally posted on by aramos]
Migrated From
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you found out, it looks like the returnPath on the login screen is not correct. You are getting logged on, but then being transferred to a non-existent page. This causes the 404 error.

I'm not sure how this is getting set up wrong. The recoverPasswordValidate method doesn't set a returnPath parameter. The only other option I see is that the referrer header is being passed with the strange URL for some reason.

Try setting the login.ignore.referrer to true in your jforum-custom.conf file. This will force the login page to only use returnPath parameters and ignore the referrer.

If this causes issues with people requesting pages, being directed to the login page, and then not getting back to the page they where trying to see... You might try adding a "hack" into the forum_login.htm Freemarker code that checks for that URL and corrects it.

Finally, you might look at creating a custom 404 page with a link back to the main site. Just to make it easier for users who find a bad link.
[originally posted on by monroe]
I'm gonna teach you a lesson! Start by looking at this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!