Solved

JSP problem

Posted on 2013-12-10
7
561 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How  can  i  resolve  HTTP Status 404 -? 8 61
Convert from a json string array to a Java object 3 65
java example issue 5 46
java mysql insert application 14 47
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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

730 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