Link to home
Start Free TrialLog in
Avatar of princehyderabad
princehyderabad

asked on

404 error

hi experts,

simple error. My hosting compnay using resin 2.0 and I;m having this 404 error, even though everything is in place.

404 Not Found
/InsertQuestion was not found on this server.


JSP:
<FORM action="QuestionSubmit.do" method="POST">
...

STRUTS-CONFIG.xml

<action path="/QuestionSubmit"  type="org.apache.struts.actions.ForwardAction" parameter="/com.xxx.InsertQuestion"> </action>
also tried
<action path="/QuestionSubmit"  type="org.apache.struts.actions.ForwardAction" parameter="/InsertQuestion"> </action>


Java:
..
public class InsertQuestion extends HttpServlet implements Servlet {

      public void doPost(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
...
getServletContext().getRequestDispatcher("/QuestionTest.jsp?ID="+rowid+"n="+name).forward(req,resp);
..
..


And I have placed class files: <web-inf>/<class>/<com>/<xxx>class files...

also I placed my class files in root <dir> and <web-inf> just to try... but still didnt worked.

Where am I going wrong.

Thx,
PH


Avatar of princehyderabad
princehyderabad

ASKER

Now I'm getting this error:
503 Unavailable

javax.servlet.UnavailableException: Parsing error processing resource path
princehyderabad,

>> <web-inf>/<class>/<com>/<xxx>class files...

Should be

>> <web-inf>/<classes>/<com>/<xxx>class files...

_________
radarsh
SOLUTION
Avatar of radarsh
radarsh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>Why are you extending HttpServlet if you are using Struts? Shouldn't you be writing Action classes?

You are right "runa_paathak" I should be using action. I was just trying to follow example set by "pankilpatel"

I was able to do same with Action, but only thing I'm missing or dont know is how to pass paramenter to JSP  from Action class.

thanks for all.