Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 30th, 2013, 03:41 PM
davidhaibk davidhaibk is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 2 davidhaibk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 42 m 25 sec
Reputation Power: 0
Rewrite Web url in struts 2

Hi folks,

I got a web application Struts2Example using struts 2 in eclipse. I have index.jsp page corresponding action class and they are running perfectly. My concern is that for the url localhost:9080/Struts2Example/index.jsp I want to change it localhost:9080/project/wpc/index.jsp without changing the web project name Struts2Example and I do not want to use the UrlRewriteFilter as well.

Can anybody help me out?

web.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" xmlns="(URL address blocked: See forum rules)" xmlns:xsi="(URL address blocked: See forum rules)" xsi:schemaLocation="(URL address blocked: See forum rules) (URL address blocked: See forum rules)">
	<display-name>Struts2Example</display-name>
	<filter>
      <filter-name>struts2</filter-name>
      <filter-class>
         org.apache.struts2.dispatcher.FilterDispatcher
      </filter-class>
   </filter>
   
   <filter-mapping>
      <filter-name>struts2</filter-name>
      <url-pattern>/*</url-pattern>
   </filter-mapping>
   
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
</web-app>


struts.xml

Code:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
   "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
   "(URL address blocked: See forum rules)">
<struts>
	<constant name="struts.devMode" value="true" />
	<package extends="struts-default" name="jaz.struts"> 
		<action name="HelloWorld" class="jazz.struts.HelloWorldAction">
			<result name="success">/success.jsp</result> 
		</action> 
	</package>
</struts>

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Rewrite Web url in struts 2


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap