• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Action Classes (Struts) with Eclipse

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I'm trying to deploy a simple web app with Tomcat and using the Sturts 1 framework.
I'm using the latest Eclipse (3.4.x) as my IDE.

I've created a Tomcat project and imported a sample Struts war file to start.

I've created a simple JSP under <workspace>/<project>/pages/ called login.jsp. The index page redirects to the login page
via <logic:redirect forward="login"/> with all appropriate struts-config xml configurations.

Hitting the page, i.e. localhost:8080/<projectname> shows my login page just fine.
and under action mappings I had:
<action
path="/login"
forward="/pages/login.jsp"
</action>

But when I add the subsequent attributes to have login page call my LoginAction class when I leave via submit button, I get loading the page

<action
path="/login"
forward="/pages/login.jsp"
type="LoginAction"
name="LoginForm"
scope="request"
validate="true"
input="/pages/login.jsp">
<forward name="success" path="/pages/success.jsp"/>
<forward name="failure" path="/pages/failure.jsp"/>
</action>

The error is a HTTP 500 error:
javax.servlet.ServletException
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I've been slaving over this seamingly simple problem for a long time and I can't figure it out.
My action forward class LoginAction and my action form class LoginForm or both proper action / form classes respectively.
They are located in Eclipse under: <ProjectName>/src/ in Package Explorer.

If anyone knows anything about this problem, your help is greatly appreciated.

Thanks again,

Michael

 
Hey! You're stepping on my hand! Help me tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic