Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cant find .do

Status
Not open for further replies.

ajaybrar

Programmer
Oct 2, 2003
9
AU
hi!
i'm having a problem with my struts application.
i have used <html:link page=&quot;/blah.jsp&quot;>blah</html:link>
for my links.
since this attaches a dynamic string to the end of the link, ie, the ;jsessionid=dsfhj3h2j3
this gives me a HTTP 300 Multiple Choices error. i get a messagesaying it can find
blah.jsp;jessionid=dfkjwefkjl3234, and that a similar document that it found was
blah.jsp
ofcourse if i refresh the page, this takes away the jsessionid string and so i can go directly go to the page.
but if i have a link that maps directly to a .do action, this doesn't work. so
<html:link page=&quot;/blah.do&quot;>blah</html:link>
returns a 404 file not found error.
i have struts-config.xml configured properly and have defined the actions properly.
the application works fine at home where i am using Tomcat 5.0 that comes with the java web services developer's pack.
the above problem happens only when i use the application on my hosting service that uses tomcat 4.1.24
however i need to have it running off that service
could someone please help and tell me what's happening and how it can me changed?
also struts is otherwise working, forms written using struts tags are displayed fine and are submitted fine as well.
its only the link thats not working.

thanks
ajay
 
Hi,

Try this ...

<html:link href=&quot;blah.jsp&quot;>Test</html:link>
OR
<html:link href=&quot;blah.do&quot;>Test</html:link>

Cheers,
-Venu
 
Ajay,

Could you just paste the Action Mapping which you are using?

Cheers,
-Venu
 
hi!
my action mapping is,
<action path=&quot;/agency&quot;
type=&quot;AgencyAction&quot;
scope=&quot;request&quot;>
<forward name=&quot;success&quot; path=&quot;/agency.jsp&quot; />
</action>

AgencyAction accesses the database, creates a User object and then places this in the context. i have similar mappings for the other three links for which .do is not working
<action path=&quot;/kiosk&quot;
type=&quot;KioskAction&quot;
scope=&quot;request&quot;>
<forward name=&quot;success&quot; path=&quot;/kiosk.jsp&quot; />
</action>

<action path=&quot;/contract&quot;
type=&quot;ContractAction&quot;
scope=&quot;request&quot;>
<forward name=&quot;success&quot; path=&quot;/contract.jsp&quot; />
</action>

and my web.xml defines the following servlet mapping
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

thanks
cheers
ajay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top