Comments (9)
@stuartwdouglas in case you've not been notified :-)
thanks!
from jastow.
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.
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.
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.
@stuartwdouglas please anything that could help? :-)
from jastow.
AFAIK the map key has to be the URI ("http://www.github.com/wuic", not "wuic").
from jastow.
If that still does not work and you put what you have on github I will have a look at it.
from jastow.
Yeah it works thanks a lot! I'll put the github link once finished so you'll have a full sample.
from jastow.
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)
- Update Jastow to the latest Apache Jasper HOT 1
- How to fix JSTL error in Jastow? HOT 11
- Map<String, TagLibraryInfo> tags = new HashMap<>(); Does NOT works. HOT 8
- Cannot support Spring view JSP. HOT 1
- Calling the JspServlet by a background thread HOT 1
- Malformed URL for tag dependant HOT 2
- How to use this library? HOT 2
- the test case running error
- Cannot be used in spring boot HOT 3
- Suggestion of a simple web app that uses JSP+Jastow+Wildfly
- Bugs Could Occur When Importing Jar undertow-servlet-1.4.20.Final.jar in This Project
- JspServletWrapper.handleJspException can throws NullPointerException HOT 1
- First Good Issue
- Update README.md
- Should Jsp Specification Version be 3.1 instead of 2.3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jastow.