This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Struts and the fly likes Workaround is needed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Workaround is needed" Watch "Workaround is needed" New topic
Author

Workaround is needed

Ludmila Snova
Greenhorn

Joined: Aug 31, 2006
Posts: 20
Workaround is needed

Hi ALL,

I use the STRUTS framework and my current the web.xml looks like this:

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>action.MyActionServlet</servlet-class>

</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

Where the action.MyActionServlet class is extended from org.apache.struts.action.ActionServlet. SO, all requests that ended with .do first of all go to that class, and when, depending on the action in URL passed to actual action class for this request.

For example, if URL is GetFile.do the request is passed to GetFileAction.java.

What I�d like to do is to add fake url (something.xml) instead of GetFile.do, for example. But I�d like that URL to be still processed by a GetFileAction.java servlet.

Is there any easy way to do? Or I have to do some struts source code modification for my fake URL? Is so, could you please tell me, which class and method in struts decide which action should be invoked.

Thanks.
 
jQuery in Action, 3rd edition
 
subject: Workaround is needed
 
It's not a secret anymore!