• 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
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

workflow problem

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!

I have a curious problem concerning the workflow of my page.

First of all the relevant snippets:

struts.xml:


index.jsp:


I guess that should be already enough.

The problem is the following:
If I call the start page (index.jsp) the first time using the URL http://localhost:8080/OEZ/ I see two conspicuous things.
1. the image oez_head_900_text.png is visible (as it should :-) )
2. Checking the html source code the form tag looks like this: <form id="do_login" method="post" action="do_login" name="do_login">

If I click now on the login button no Action is involved but I am redirected to http://localhost:8080/OEZ/flow/start.action. So the login procedure does not take place as expected.
Now the 2 conspicuous things look like this:
1. the image is not displayed anymore (don't know if this fact is relevant for the actual problem?!)
2. the form tag looks like this now: <form id="do_login" method="post" action="/OEZ/flow/do_login.action" name="do_login">

If I click now on the login button the login procedure works as expected.

So my main question is:
Why does the login not work when clicking the login button the first time?
I guess that is has something to do with my package definition within the struts.xml, but I don't see what is wrong here.
Anyway, I am wondering why I not immediatly redirected to .../flow/start.action when I call the page for the first time. Shouldn't the default-package definition do this for every request not specifiying a concrete namespace?

Any struts pro how can help me? :-)

Greetings,
oetzi


 
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all the reason your image isnt showing is because of the way you built the src tag for the image. You should think about using <s:url to build it. So instead of what you did you should do:



Have you tried defining your namespace in the form? Its only going to redirect on a SUCCESS response from your execute method but that may perhaps be your issue ...

So ...

 
Manuel Oetzi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Jesus,

thanks for your answer.
The issue with the image has been solved, but unfortunately not the one with the workflow.

Jesus Mireles wrote:
Have you tried defining your namespace in the form? Its only going to redirect on a SUCCESS response from your execute method but that may perhaps be your issue ...



The login action itself is not called at all. My debug print.out is first displayed after clicking the second time on the login-button.
Therefore I assume that it has something to do with the workflow defined in the struts.xml.

By the way the following warning is displayed when calling the start page, but also for the "second start page".
24.06.2011 10:18:55 com.opensymphony.xwork2.util.logging.jdk.JdkLogger warn
WARN: No configuration found for the specified action: 'do_login' in namespace: 'flow'. Form action defaulting to 'action' attribute's literal value.
-> I don't see the reason for this warning as I have the name space "flow" and the action "do_login in it.


 
Jesus Mireles
Ranch Hand
Posts: 122
Mac IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually your namespace is defined as /flow in the struts ... so thats what you should use for namespace instead of just flow without the /

-Jesus
 
Manuel Oetzi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh my god...
Sometimes also the little things can have a hugh impact... ;-)

Thanks a lot!
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic