• 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

Struts2: struts.xml doesn't forward to action name

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will suppose this is a big question.but there might be a simple problem which I can't find the reason.

There is a form( a simple login) whose action name is 'loginAction' in a jsp page called 'index.jsp' . In the action class, the execute() method checks whether the username,password are valid. If it is a valid login, execute() method returns SUCCESS which forward to another jsp page called 'account.jsp' in a folder called 'jsp' inside WEB-INF.

The problem is that, struts.xml forwards all valid logins to the relavant url , but the page(account.jsp) cannot be retrieved.Browser gives 404 error.But the url which the browser says 'not available' was just copied and pasted to the browser's address bar manually. Then the page is displayed !!!
Here is the struts.xml file


Here is the struts_auth.xml file which is included in above struts.xml


and this is what browser says as the reason

description: The requested resource (/app/auth/acc) is not available

.
But if this url (http://localhost:8084/app/auth/acc)just copied into the browser's address bar, it just shows the real page . Please let me know where my problem is.
 
Ranch Hand
Posts: 52
Eclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you post your directory structure?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic