Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Broken Link in form-action  RSS feed

 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I'm getting Broken Link message for my action in my JSP.

<form method='Post' action='com.testproject.ProcessEmail'>

All my classes are in
/<projectname>/Web Content/WEB-INF/classes/com/testproject/

All my JSPs are in
/<projectname>/Web Content/

Wondering what's wrong with action='com.testproject.ProcessEmail'

Thanks
 
k matt
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about trying with a different syntax action=" /com/testproject.someClassName"

assuming testproject is the packageName
and com is directly under the projectName folder


k matt
[ October 19, 2005: Message edited by: k matt ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you create a servlet mapping for your servlet or are you relying on the invoker?
 
Dilip kumar
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick response
Package name is 'com.testproject'. ProcessEmail is a regular java class not the servlet.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Dilip kumar:
Thanks for the quick response
Package name is 'com.testproject'. ProcessEmail is a regular java class not the servlet.


I suggest you pick up a book on Servlets/JSP.
If you search this and the servlet's forum with keyword "book", you'll find plenty of recommendations.
 
k matt
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Sorry I thought it was a servlet then the syntax would have been
action="com/testproject.someClassName" or action="/projectname/com/testproject.someClassName"
I am not sure whether you can access regular class files by putting
action="com/testproject.someClassName"


k matt
[ October 19, 2005: Message edited by: k matt ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure whether you can access regular class files


You cannot. Hence Ben's suggesting of picking up some reading material.
 
k matt
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
My guess, it has to be a servlet , a class which extends some Servlet class , if you have to directly interact with a page.

One possible way of doing it is let the link call a servlet which in turn uses your non-servlet class .

K matt
[ October 19, 2005: Message edited by: k matt ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!