Solved

JSP problem

Posted on 2013-12-10
7
551 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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 …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

914 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