• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

/struts2tutorial/struts2tutorial/roseindia/showLogin.action) is not available.

 
Hrishikesh Maluskar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i ma getting the following error ->(/struts2tutorial/struts2tutorial/roseindia/showLogin.action) is not available.


struts.xml->



index.html

 
Karan Johar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are other actions working. see for any errors in log files, there could be issue with struts starting itself.
 
Ankit Garg
Sheriff
Posts: 9509
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't see any href attributes in your anchors in the index.html page. Anyways I suppose your context path is /struts2tutorial and as you can see, the URL in the browser is /struts2tutorial/struts2tutorial so I suppose you've made some error in the URL. Did you write your anchors as



That will become a relative path and thus the context path will be added twice. Try one of the following




Although I won't recommend any of the above solutions as first one hard codes the context path and the second one is a relative path, but since you have a static HTML page, so these are the choices that I see fit...
 
Hrishikesh Maluskar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
other actions are also not working..in the log is shows the following message->


2009-10-03 12:05:30 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2009-10-03 12:05:34 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2009-10-03 12:05:34 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2009-10-03 12:05:37 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2009-10-03 12:05:37 StandardContext[/servlets-examples]SessionListener: contextInitialized()
 
Karan Johar
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The struts config file looks unusual, never seen <package> tag in a struts config file; also <struts-config> is usually the first tag in config file.
 
Hrishikesh Maluskar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ankit and karan..actually i had kept my application struts2tutorial inside another directory named struts2tutorial..hence it was showing as /struts2tutorial/struts2tutorial.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karan Johar wrote:The struts config file looks unusual, never seen <package> tag in a struts config file; also <struts-config> is usually the first tag in config file.

Struts 2.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic