Solved

JSP problem

Posted on 2013-12-10
7
548 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

760 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

20 Experts available now in Live!

Get 1:1 Help Now