For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 6 replies, 2 voices, and was last updated 21 years, 9 months ago by
dpoland.
-
AuthorPosts
-
dpolandMemberHello,
I’m new to struts and having a small problem when following the demo.
The success.jsp shows:
“Congratulations null, you logged in!”I checked and double-checked the code but cannot find the culprit. I’m not sure if it’s something I missed in struts or a prob with MyEclipse. Here’s some relevant snippits…
struts-config.xml:
<form-bean
name=”loginForm”
type=”com.youcompany.struts.form.LoginForm”>
<form-property
name=”name”
type=”java.lang.String” />
</form-bean>login.jsp:
<html:form action=”/login.do”> name :
<html:text property=”name”/>
<html:errors property=”name”/>success.jsp:
<body>
Congratulations <%=session.getAttribute(“name”)%>, you logged in!
</body>Here’s my system env.
* WinXP Pro
* Eclipse Platform: Version: 2.1.0 Build id: 200303272130
* Was Eclipse freshly installed for MyEclipse? No
* If not, was it upgraded to its current version using the update manager? No
* Are any other external plugins installed? LogWatcher, SolarEclipse, DbEdit
* How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.* 7
* What MyEclipse version are you using? (Help > About Eclipse Platform > Features) 8 from Eclipse.org, 5 from MyEclipse
* What JDK version are you using to run Eclipse? (java -version) java version “1.4.2_03”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)*What JDK version are you using to launch your application server? same as above
* What steps did you take that resulted in the issue? followed the flash demo
* What application server are you using? tomcat 5
* Are there any errors in the Eclipse log?
(<workspace>/.metadata/.log) not that apply to this issue.March 6, 2004 at 8:43 am #204375
Scott AndersonParticipantDoug,
I don’t see anything obvious. Since you’re using Tomcat 5, have you taken advantage of our source-level JSP debugging to try to isolate the issue? You can always trace the code where the property is set to ensure it’s getting into the session under the correct key for example.
March 6, 2004 at 10:40 am #204382
dpolandMemberHi Scott,
Thanks, I’ll give that a try
March 6, 2004 at 11:01 am #204383
dpolandMemberScott,
This may be wandering from a MyEclipse issue to a generic Eclipse prob.. Maybe you can point me in the right direction.
First, when I save any .jsp file I get a dialog box that says:
“success.jsp will be saved in ISO-8859-1 encoding which is not the
current workbench encoding. This can result in conflicts with other
tools. Continue anyway?”Could this be an issue? Also, when stepping through the code, I cannot see the source of any class files in struts.jar. How do I view the source so I can step through
Thanks for your help.
March 6, 2004 at 1:55 pm #204384
dpolandMemberJust a quick follow-up… I downloaded the struts source and was able to attach that to Eclipse for debugging, that’s cool. Also, I tried a completely fresh install of Eclipse/MyEclipse and a new workspace to see if I had better luck. Unfortunately not. Still getting null from session.getAttribute(“name”)
March 6, 2004 at 4:57 pm #204389
Scott AndersonParticipantDoug,
I don’t think it’s an installation problem, I think it’s an application configuration problem / error. Perhaps you could try downloading and running some of the Struts demos that are provided by Apache?
March 6, 2004 at 5:50 pm #204390
dpolandMemberHi Scott,
We’re on the same wavelength, I’ve downloaded and successfully run the two projects in the O’Reilly Jakarta Struts
book. I’m fine with that. Thanks for your help. -
AuthorPosts
