You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Achim Nierbeck <bc...@googlemail.com> on 2014/03/04 15:09:05 UTC
Re: Annotation processing in war deployed to karaf 3.0.0
Hi,
standard Servlet API 3.0 annotations should work with Pax Web by just
installing the war feature.
Though I just found and fixed a bug for Filter annotations (Pax Web
3.0.7-SNAPSHOT comes with Karaf 3.0.1-SNAPSHOT).
Concerning the @MultipartConfig I'm not sure if it'll work right away, if
not please open a bug at Pax Web [1]
for it.
regards, Achim
[1] - https://ops4j1.jira.com/browse/PAXWEB
2014-02-25 14:48 GMT+01:00 lis0x90 <li...@gmail.com>:
> First of all I can't find out any more complex web application example than
> simple servlet with "Hello Wold" using plain servlet.
>
> Demos in Karaf distribution does not provide it too. =(
>
> Can I use annotation @WebServlet to declare servlet in java code?
> What should I do (install some features or external bundles) to tell Karaf
> process annotations in my war?
>
> PS. Also I need to use @MultipartConfig annotation on my servlet
>
> Thanks in advice
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master
Re: Annotation processing in war deployed to karaf 3.0.0
Posted by Achim Nierbeck <bc...@googlemail.com>.
Awsome :)
been a pleasure :)
2014-04-17 20:16 GMT+02:00 lis0x90 <li...@gmail.com>:
> I just test @MultipartConfig on Karaf 3.0.1.
>
> It's works! Thank you!
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032847.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master
Re: Annotation processing in war deployed to karaf 3.0.0
Posted by lis0x90 <li...@gmail.com>.
I just test @MultipartConfig on Karaf 3.0.1.
It's works! Thank you!
--
View this message in context: http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032847.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Annotation processing in war deployed to karaf 3.0.0
Posted by Achim Nierbeck <bc...@googlemail.com>.
yep,
I'm working on a test for verification.
regards, Achim
2014-03-09 17:57 GMT+01:00 lis0x90 <li...@gmail.com>:
> Thank you for support.
>
> I create jira issue: https://ops4j1.jira.com/browse/PAXWEB-680
>
> Hope I fill all required fields correctly.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032147.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master
Re: Annotation processing in war deployed to karaf 3.0.0
Posted by lis0x90 <li...@gmail.com>.
Thank you for support.
I create jira issue: https://ops4j1.jira.com/browse/PAXWEB-680
Hope I fill all required fields correctly.
--
View this message in context: http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032147.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.
Re: Annotation processing in war deployed to karaf 3.0.0
Posted by Achim Nierbeck <bc...@googlemail.com>.
I fixed the Jira issue, you now should be able to create a new issue for
tracking.
regards, Achim
2014-03-09 7:58 GMT+01:00 Achim Nierbeck <bc...@googlemail.com>:
> Hi,
>
> sorry about the Jira, I'm not aware of any issues with it, could you give
> me your jira-id so I will enable you to open an issue.
>
> regarding the @MultipartConfig, looks like I missed that part, sorry about
> that.
> Will need to look what impact it has and add it to future versions of Pax
> Web.
>
> regards, Achim
>
>
>
> 2014-03-08 21:12 GMT+01:00 lis0x90 <li...@gmail.com>:
>
> Thank you for answer.
>>
>> I just registered a jira account, but seems that I have no permissions to
>> create a new tasks.
>>
>> Regarding my question:
>> I annotate class with @MultipartConfig and try to use inside doPost()
>> method
>> getPart(String name) method and gets an exception:
>> java.lang.IllegalStateException: No multipart config for servlet
>> at org.eclipse.jetty.server.Request.getParts(Request.java:2061)
>> at org.eclipse.jetty.server.Request.getPart(Request.java:2043)
>> at
>>
>> ru.kamis.test.samplewebapp.MultipartServletTest.doPost(MultipartServletTest.java:25)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
>>
>> Also I trying to check myself by deploying the same war to jboss 8 as.
>> Inside Jboss it works as expected.
>>
>> Servlet code:
>> @WebServlet(name="multipart-servlet-test", urlPatterns={"/upload"})
>> @MultipartConfig
>> public class MultipartServletTest extends HttpServlet {
>> private static final long serialVersionUID = 1L;
>>
>> protected void doPost(HttpServletRequest request,
>> HttpServletResponse
>> response) throws ServletException, IOException {
>> final Part filePart = request.getPart("exampleFile");
>> response.getWriter().write("Part of file: " + filePart);
>> }
>> }
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032144.html
>> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>>
>
>
>
> --
>
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
>
> Software Architect / Project Manager / Scrum Master
>
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master
Re: Annotation processing in war deployed to karaf 3.0.0
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,
sorry about the Jira, I'm not aware of any issues with it, could you give
me your jira-id so I will enable you to open an issue.
regarding the @MultipartConfig, looks like I missed that part, sorry about
that.
Will need to look what impact it has and add it to future versions of Pax
Web.
regards, Achim
2014-03-08 21:12 GMT+01:00 lis0x90 <li...@gmail.com>:
> Thank you for answer.
>
> I just registered a jira account, but seems that I have no permissions to
> create a new tasks.
>
> Regarding my question:
> I annotate class with @MultipartConfig and try to use inside doPost()
> method
> getPart(String name) method and gets an exception:
> java.lang.IllegalStateException: No multipart config for servlet
> at org.eclipse.jetty.server.Request.getParts(Request.java:2061)
> at org.eclipse.jetty.server.Request.getPart(Request.java:2043)
> at
>
> ru.kamis.test.samplewebapp.MultipartServletTest.doPost(MultipartServletTest.java:25)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
>
> Also I trying to check myself by deploying the same war to jboss 8 as.
> Inside Jboss it works as expected.
>
> Servlet code:
> @WebServlet(name="multipart-servlet-test", urlPatterns={"/upload"})
> @MultipartConfig
> public class MultipartServletTest extends HttpServlet {
> private static final long serialVersionUID = 1L;
>
> protected void doPost(HttpServletRequest request,
> HttpServletResponse
> response) throws ServletException, IOException {
> final Part filePart = request.getPart("exampleFile");
> response.getWriter().write("Part of file: " + filePart);
> }
> }
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032144.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master
Re: Annotation processing in war deployed to karaf 3.0.0
Posted by lis0x90 <li...@gmail.com>.
Thank you for answer.
I just registered a jira account, but seems that I have no permissions to
create a new tasks.
Regarding my question:
I annotate class with @MultipartConfig and try to use inside doPost() method
getPart(String name) method and gets an exception:
java.lang.IllegalStateException: No multipart config for servlet
at org.eclipse.jetty.server.Request.getParts(Request.java:2061)
at org.eclipse.jetty.server.Request.getPart(Request.java:2043)
at
ru.kamis.test.samplewebapp.MultipartServletTest.doPost(MultipartServletTest.java:25)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
Also I trying to check myself by deploying the same war to jboss 8 as.
Inside Jboss it works as expected.
Servlet code:
@WebServlet(name="multipart-servlet-test", urlPatterns={"/upload"})
@MultipartConfig
public class MultipartServletTest extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
final Part filePart = request.getPart("exampleFile");
response.getWriter().write("Part of file: " + filePart);
}
}
--
View this message in context: http://karaf.922171.n3.nabble.com/Annotation-processing-in-war-deployed-to-karaf-3-0-0-tp4031937p4032144.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.