Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

JSP problem

Posted on 2013-12-10
7
Medium Priority
?
576 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 36

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
Industry Leaders: 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!

 
LVL 36

Accepted Solution

by:
mccarl earned 1600 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 36

Expert Comment

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

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
A solution for Fortify Path Manipulation.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 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