Unsubscribe newsletter
Unsubscribe newsletter
Hi,
I have a newsletter system, I want to insert an unsubscribe button in the email, how can I make an HTML GET or POST request that can communicate with SFS2X?
Best regards
I have a newsletter system, I want to insert an unsubscribe button in the email, how can I make an HTML GET or POST request that can communicate with SFS2X?
Best regards
Re: Unsubscribe newsletter
I don't think the documentation you sent reflects my question.
I have to put an Unscribe button in the email that users of my newsletters receive, in the documentation you provide it can be done from the client or from the server.
I have to put an Unscribe button in the email that users of my newsletters receive, in the documentation you provide it can be done from the client or from the server.
Re: Unsubscribe newsletter
Sorry, wrong article indeed.
Please refer to this tutorial --> https://smartfoxserver.com/blog/http-re ... tegration/
Cheers
Please refer to this tutorial --> https://smartfoxserver.com/blog/http-re ... tegration/
Cheers
Re: Unsubscribe newsletter
Thank you!!
Re: Unsubscribe newsletter
I copied the guide perfectly, but I keep getting this error:
My setup:
Eclipse Packages:
SFS2X:
Folder www:
web.xml
Code: Select all
GRAVE: Allocate exception for servlet [ExtensionTest]
java.lang.ClassNotFoundException: sfs2x.test.http.ExtensionHTTPFacade
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:538)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:519)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:149)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1070)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:788)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:128)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at sfs2x.ws.tomcat.shared.WSUpgradeFilter.invoke(WSUpgradeFilter.java:75)
at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:555)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
My setup:
Eclipse Packages:
SFS2X:
Folder www:
web.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
metadata-complete="false"
version="3.1">
<display-name>SFS2X Test</display-name>
<servlet>
<servlet-name>ExtensionTest</servlet-name>
<servlet-class>sfs2x.test.http.ExtensionHTTPFacade</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ExtensionTest</servlet-name>
<url-pattern>/ExtensionTest</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
Re: Unsubscribe newsletter
Is it possible to get support?
Re: Unsubscribe newsletter
The servlet is not deployed correctly.
Please check the screenshot in the article, it shows exactly how the structure of the .war should be.
From what I can see you have deployed a jar file under the package structure, which is incorrect.
Also I don't think it's a good idea to keep the classes in the same project in your IDE because one file must be deployed as a normal .jar library (Extension) and the other as .war file with its servlet structure.
Two separate projects is probably better.
Thanks
p.s. = from the screenshot it looks like you're still using the old Flash AdminTool with the latest SFS2X 2.18.x
I would highly recommend to switch to the native HTML AdminTool, as you're missing many features that have been added since 2.14
Please check the screenshot in the article, it shows exactly how the structure of the .war should be.
From what I can see you have deployed a jar file under the package structure, which is incorrect.
Also I don't think it's a good idea to keep the classes in the same project in your IDE because one file must be deployed as a normal .jar library (Extension) and the other as .war file with its servlet structure.
Two separate projects is probably better.
Thanks
p.s. = from the screenshot it looks like you're still using the old Flash AdminTool with the latest SFS2X 2.18.x
I would highly recommend to switch to the native HTML AdminTool, as you're missing many features that have been added since 2.14
Re: Unsubscribe newsletter
Thanks for the information, it's very valuable to me.
I have questions:
1) Is the structure right now?
2) I have exported the whole project in .WAR, now what should I do with this file?
3) If I understood correctly the "SimpleSumExtension" class must be in the main project of the server and distributed in the server as .jar extension, while "ExtensionHTTPFacade" must be in another project and distributed under the "www" folder as .war, it's correct?
3) How do I use the native HTML AdminTool?
4) What should I put inside the "ext" folder? All my main server project .jar extensions or just the "SimpleSumExtension" extension?
Thanks for the support, it's vital for me
I have questions:
1) Is the structure right now?
2) I have exported the whole project in .WAR, now what should I do with this file?
3) If I understood correctly the "SimpleSumExtension" class must be in the main project of the server and distributed in the server as .jar extension, while "ExtensionHTTPFacade" must be in another project and distributed under the "www" folder as .war, it's correct?
3) How do I use the native HTML AdminTool?
4) What should I put inside the "ext" folder? All my main server project .jar extensions or just the "SimpleSumExtension" extension?
Thanks for the support, it's vital for me
Re: Unsubscribe newsletter
Hi,
1) Under WEB-INF/ you need a folder called classes/ which will contain your Java packages.
Also you're missing the web.xml file in the archive.
In other words:
If you check the article I've linked you can see exactly how the folders are organized.
https://smartfoxserver.com/blog/http-re ... tegration/
2)
Check the article under the "Putting it all together" section.
3)
Yes
Point your browser to your server's IP or domain ---> Example: http://my.domain:8080/admin
Also check the docs:
http://docs2x.smartfoxserver.com/Gettin ... /admintool
What is the "ext" folder? Do you mean the SFS2X/extension/ folder?
If so, yes only the Extension code.
Cheers
1) Under WEB-INF/ you need a folder called classes/ which will contain your Java packages.
Also you're missing the web.xml file in the archive.
In other words:
Code: Select all
WEB-INF/
classes/
... your package(s) here ...
web.xml
If you check the article I've linked you can see exactly how the folders are organized.
https://smartfoxserver.com/blog/http-re ... tegration/
2)
Check the article under the "Putting it all together" section.
3)
Yes
How do I use the native HTML AdminTool?
Point your browser to your server's IP or domain ---> Example: http://my.domain:8080/admin
Also check the docs:
http://docs2x.smartfoxserver.com/Gettin ... /admintool
4) What should I put inside the "ext" folder? All my main server project .jar extensions or just the "SimpleSumExtension" extension?
What is the "ext" folder? Do you mean the SFS2X/extension/ folder?
If so, yes only the Extension code.
Cheers
Re: Unsubscribe newsletter
Thanks, you cleared up a lot of my doubts.
My new Eclipse setup is this:
In your guide I see an "ext" folder, but I don't understand what goes inside
What should I do with the .war file?
In your documentation I see "ExtensionHTTPFacade.class", but how do I export to .class?
My new Eclipse setup is this:
In your guide I see an "ext" folder, but I don't understand what goes inside
What should I do with the .war file?
In your documentation I see "ExtensionHTTPFacade.class", but how do I export to .class?
Re: Unsubscribe newsletter
Updates:
This is my structure on Eclipse: (The .dlls are inside the "classes" folder)
This is my web.xml file
The extension in the server loaded successfully, but when I try the link: http://localhost:8080/ExtensionTest/Ext ... ,50,112,88
I get: HTTP Status 404 - Not Found
This is my structure on Eclipse: (The .dlls are inside the "classes" folder)
This is my web.xml file
The extension in the server loaded successfully, but when I try the link: http://localhost:8080/ExtensionTest/Ext ... ,50,112,88
I get: HTTP Status 404 - Not Found
Re: Unsubscribe newsletter
Is it possible to get support?
Re: Unsubscribe newsletter
I figured out how to use the .war file, just put it in the WWW folder, anyways I get this error:
But my code and struct I think are correct
Code: Select all
nov 28, 2022 3:41:16 PM org.apache.catalina.core.ApplicationContext log
INFORMAZIONI: Marking servlet [ExtensionTest] as unavailable
nov 28, 2022 3:41:16 PM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet [ExtensionTest]
java.lang.ClassNotFoundException: sfs2x.test.http.ExtensionHTTPFacade
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:538)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:519)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:149)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1070)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:788)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:128)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at sfs2x.ws.tomcat.shared.WSUpgradeFilter.invoke(WSUpgradeFilter.java:75)
at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:555)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
But my code and struct I think are correct
Re: Unsubscribe newsletter
i solved!!
My class packages were in the wrong location, I should have placed them in "Java Resources" and not in the http folder!!
My class packages were in the wrong location, I should have placed them in "Java Resources" and not in the http folder!!
Who is online
Users browsing this forum: No registered users and 83 guests