Solved

JSP problem

Posted on 2013-12-10
7
554 Views
Last Modified: 2013-12-14
I have an web app . I open its home page with this ...

http://localhost:8080/PaymentServices/view/index.action   <----- This opens in browser
 


Now , I  want to  add a welcome page to my application  


I put this  entries ...

web.xml :

<display-name>PaymentServices</display-name>
      <welcome-file-list>
            <welcome-file>welcome.jsp</welcome-file>
</welcome-file-list>



welcome.jsp
------------

<%
  response.sendRedirect("/view/index.action");
%>



Now , when I do this ..
http://localhost:8080/PaymentServices   <------ This does not open in browser .

I was expecting to open home page here.

Error : Could not find action or result: There is no Action mapped for namespace [/] and action name [] associated with context path [/PaymentServices]

How to fix it ?
0
Comment
Question by:cofactor
  • 4
  • 3
7 Comments
 

Author Comment

by:cofactor
ID: 39708459
comments please
0
 
LVL 35

Expert Comment

by:mccarl
ID: 39710361
Can you post your entire web.xml file please?
0
 

Author Comment

by:cofactor
ID: 39710575
web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	id="WebApp_ID" version="2.5">
        
	<display-name>PaymentServices</display-name>
	<welcome-file-list>
		<welcome-file>welcome.jsp</welcome-file>
	</welcome-file-list>
	
	<filter>
  <filter-name>Struts2</filter-name>
  <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

    <filter-mapping>
        <filter-name>Struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>  
	
	<servlet>
    <display-name>Apache-Axis Servlet</display-name>
    <servlet-name>AxisServlet</servlet-name>
    <servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/servlet/AxisServlet</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>*.jws</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>AxisServlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping>
	<welcome-file-list>
		<welcome-file>/view/index.action</welcome-file>
	</welcome-file-list>
	<error-page>
		<error-code>404</error-code>
		<location>/axis2-web/Error/error404.jsp</location>
	</error-page>
	<error-page>
		<error-code>500</error-code>
		<location>/axis2-web/Error/error500.jsp</location>
	</error-page>
	
</web-app>

Open in new window

0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 35

Accepted Solution

by:
mccarl earned 400 total points
ID: 39711030
You already have <welcome-file-list> on lines 39 - 41. Get rid of those lines and just leave the ones on line 8 - 10 and see if that makes a difference.
0
 

Author Closing Comment

by:cofactor
ID: 39718664
Excellent.
0
 

Author Comment

by:cofactor
ID: 39718665
This worked fine.

Thanks
0
 
LVL 35

Expert Comment

by:mccarl
ID: 39719405
Not a problem, glad to help! :)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
topping3 challenge 14 79
printing a file in reverse order is easy in recursion rather than in iteration 3 56
eclipse shortcuts 9 54
tomcat not starting 6 45
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now