Giter Site home page Giter Site logo

Comments (9)

gdrouet avatar gdrouet commented on July 17, 2024

@stuartwdouglas in case you've not been notified :-)

thanks!

from jastow.

stuartwdouglas avatar stuartwdouglas commented on July 17, 2024

Does this help: https://github.com/undertow-io/jastow/blob/master/src/test/java/io/undertow/test/jsp/basic/SimpleJspTestCase.java

It shows how to create a simple JSP deployment

from jastow.

stuartwdouglas avatar stuartwdouglas commented on July 17, 2024

In order to make you tag work you need to populate the map that is passed into JspServletBuilder.setupDeployment (the new HashMap<String, TagLibraryInfo>() bit).

from jastow.

gdrouet avatar gdrouet commented on July 17, 2024

Yes test case helps a lot but this is not enough since I use a custom tag. In fact, I need to play with setupDeployment. I did not fiund the way I can specify the use of my TLD so I tried to configure POJOs manually:

final HashMap<String, TagLibraryInfo> tagLibs = new HashMap<String, TagLibraryInfo>();
final TagInfo wuic = new TagInfo();
wuic.setDisplayName("Web UI Compressor");
wuic.setTagClassName("com.github.wuic.tag.WuicTag");
wuic.setTagName("html-import");
wuic.setBodyContent("empty");
final TagAttributeInfo workflowId = new TagAttributeInfo();
workflowId.setName("workflowId");
wuic.addTagAttributeInfo(workflowId);

final TagLibraryInfo wuicTagLibInfo = new TagLibraryInfo();
wuicTagLibInfo.addTagInfo(wuic);
wuicTagLibInfo.setPrefix("wuic");
wuicTagLibInfo.setUri("http://www.github.com/wuic");
tagLibs.put("wuic", wuicTagLibInfo);

Note that jspPropertyGroups is empty.

In my JSP, I use the tag:

<%@ taglib prefix="wuic" uri="http://www.github.com/wuic" %>
<wuic:html-import workflowId="foo"/>

Undertow fails to find the tag...

from jastow.

gdrouet avatar gdrouet commented on July 17, 2024

@stuartwdouglas please anything that could help? :-)

from jastow.

stuartwdouglas avatar stuartwdouglas commented on July 17, 2024

AFAIK the map key has to be the URI ("http://www.github.com/wuic", not "wuic").

from jastow.

stuartwdouglas avatar stuartwdouglas commented on July 17, 2024

If that still does not work and you put what you have on github I will have a look at it.

from jastow.

gdrouet avatar gdrouet commented on July 17, 2024

Yeah it works thanks a lot! I'll put the github link once finished so you'll have a full sample.

from jastow.

gdrouet avatar gdrouet commented on July 17, 2024

Here is the sample from my open source project: https://github.com/wuic/wuic-test/blob/wuic-0.5.x-snapshot/src/main/java/com/github/wuic/test/Server.java

from jastow.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.