• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about the SSO

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am a fresher of sso,i have read the http://www.jforum.net/confluence/display/integration/Overview.
Then i make a login page of login.asp.I store the username in the cookie:
Cookie cookie = new Cookie("JforumSSO", username);
response.encodeRedirectURL("http://222.201.186.143:8083/jforum/").

I make a MyUserSSo.java.

In the SystemGlobals.properties of jfourm:
commented : #sso.implementation = net.jforum.sso.RemoteUserSSO
added : sso.implementation = net.jforum.sso.MyUserSSO

commented : #authentication.type = default
added : authentication.type=sso
sso.password.attribute = password
sso.email.attribute = email
sso.default.email = sso@user
sso.default.password = sso
sso.redirect =http://192.168.1.18:8080/login.jsp
but when i connect the jfourm after i login the web.The error is like this:


Expression templateName is undefined on line 5, column 14 in exception.html. The problematic instruction: ---------- ==> ${templateName} [on line 5, column 12 in exception.html] in include "${templateName}/message.htm" [on line 5, column 1 in exception.html] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression templateName is undefined on line 5, column 14 in exception.html. at
-----------------------------------------

What is the problem? How can i solve this?
Thank you your help.


[originally posted on jforum.net by johnson_scut]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the tomcat logs. The real error is in there.

If you want, you can attach it here, so we can take a look.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Expression templateName is undefined on line 5, column 14 in exception.html. The problematic instruction: ---------- ==> ${templateName} [on line 5, column 12 in exception.html] in include "${templateName}/message.htm" [on line 5, column 1 in exception.html] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression templateName is undefined on line 5, column 14 in exception.html. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.renderElementToString(Environment.java:1461) at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95) at freemarker.core.Include.accept(Include.java:110) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:231) at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:108) at net.jforum.JForum.service(JForum.java:218) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595)
[originally posted on jforum.net by youlong05]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got exactly the same error. Anyone got any idea? Thanks .
[originally posted on jforum.net by ORYH]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a note on the MyUserSSO.java example from wiki, the code provided doesn't work with version 2.1.6 source code.
That code contains some errors: reference to JForumContext instead of JForumExecutionContext, call to an undefined addCookie with age, redirect to login page not working.
Here's a slightly modified version (with single cookie), that may help someone to better understand the "simplified sso" cookie mechanism.


[originally posted on jforum.net by Jules]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sorry for bringing up an old thread but i really to know this .. Sorry for bein g really a junior in JAVA but sorry Jules could you or any member could tell me how to compile this class?

I have all the import files in the same directory but i get this error in while i compile

MyUserSSO.java:5: cannot access SSO
bad class file: .\SSO.class
class file contains wrong class: net.jforum.sso.SSO
Please remove or make sure it appears in the correct subdirectory of the classpath.

public class MyUserSSO implements SSO {
^
1 error

Can anyone give some suggestions on this error?

Thanks!!!

[originally posted on jforum.net by mat091285]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have all the import files in the same directory but i get this error in while i compile



I don't know which compiler/ide can produce an error message like that, but the sentence above may be linked to the real error.
For compiling successfully you must preserve the package/directory structure, if you have all the imported class (different class from different package) in the same dir you'll surely get some class not found error at compile time.
What i suggest is to extract somewhere the full source tree (get it from here http://www.jforum.net/download-source.jsp) import all the source in a new project with your ide (eclipse,netbeans,ecc...) add the new class and compile all the sources.
Hope this helps.
[originally posted on jforum.net by Jules]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jules thanks for the reply! Sorry to ask another question but then how would the JSP page code look like? would it call the methods in the complied class MyUserSSO ?

Do you have a sample code?

Sorry for this request as i really need some examples to follow for my project.

Thanks!
Mat
[originally posted on jforum.net by mat091285]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got Eclipse v3.2.2
I'm using j2sdk1.4.2_12
I've gotten the source from the downloadable zip.
I've gotten the missing 5 .jar files from the CVS.

I've gotten to the point where the existing stuff will rebuild without errors - just 90 warnings.

I've created a MyUserSSO.java using the code in this thread.

I show an import that cannot be resolved:

import net.jforum.ActionServletRequest;

I find this file in the CVS only by viewing dead files.

Again, please, does ANYONE have a working version of simple cookie-based SSO for JForum v2.1.7?

Please?

I'll trade you for some Oracle consulting time. Really!

Thanks,
Jennifer
[originally posted on jforum.net by jenamon]
reply
    Bookmark Topic Watch Topic
  • New Topic